]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: nm256: Don't call card private_free at probe error path
authorTakashi Iwai <tiwai@suse.de>
Tue, 12 Apr 2022 10:26:36 +0000 (12:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 07:34:09 +0000 (09:34 +0200)
commit8f2f2035c4ef17eb66604057b0ba885c3433e016
tree2861fec1c73f090d9c8db2ba04d0cc5bf5d95e45
parentf51fc40e7c5390810bb74c6f0a7777c6b96c49ff
ALSA: nm256: Don't call card private_free at probe error path

commit 558e6c99302f330e7ad6dfc5139464dc1afed278 upstream.

The card destructor of nm256 driver does merely stopping the running
streams, and it's superfluous for the probe error handling.  Moreover,
calling this via the previous devres change would lead to another
problem due to the reverse call order.

This patch moves the setup of the private_free callback after the card
registration, so that it can be used only after fully set up.

Fixes: b3923ae33e2f ("ALSA: nm256: Allocate resources with device-managed APIs")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220412102636.16000-40-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/nm256/nm256.c