]> 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)
committerTakashi Iwai <tiwai@suse.de>
Tue, 12 Apr 2022 15:58:44 +0000 (17:58 +0200)
commit1ca4514ff6cb31a88a137a4dbe996abbcf17103a
tree36662947bdbec98e40270aa62d221f335acdd41b
parentd3c3c9457cacb1827c8c93761e60fa3ce1a4aef0
ALSA: nm256: Don't call card private_free at probe error path

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: 2cbef1f72c41 ("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>
sound/pci/nm256/nm256.c