]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: mtpav: Don't call card private_free at probe error path
authorTakashi Iwai <tiwai@suse.de>
Tue, 12 Apr 2022 10:26:35 +0000 (12:26 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 12 Apr 2022 15:58:43 +0000 (17:58 +0200)
commit5d87274efb125cc6fa1a476f4bcb5230a4958351
tree7f440dd8fb594f8fa38b1481eff7db7bb684dd61
parent499d39d4dfee6e459f5f3c874e130c5a8a55982e
ALSA: mtpav: Don't call card private_free at probe error path

The card destructor of nm256 driver does merely stopping the running
timer, 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: 36b11e8787d8 ("ALSA: mtpav: Allocate resources with device-managed APIs")
Link: https://lore.kernel.org/r/20220412102636.16000-39-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/drivers/mtpav.c