mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
ALSA: mtpav: Don't call card private_free at probe error path
[ Upstream commit4fb2719087
] 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:aa92050f10
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a75f5be104
commit
365d2f0196
1 changed files with 2 additions and 2 deletions
|
@ -693,8 +693,6 @@ static int snd_mtpav_probe(struct platform_device *dev)
|
|||
mtp_card->outmidihwport = 0xffffffff;
|
||||
timer_setup(&mtp_card->timer, snd_mtpav_output_timer, 0);
|
||||
|
||||
card->private_free = snd_mtpav_free;
|
||||
|
||||
err = snd_mtpav_get_RAWMIDI(mtp_card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
@ -716,6 +714,8 @@ static int snd_mtpav_probe(struct platform_device *dev)
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
card->private_free = snd_mtpav_free;
|
||||
|
||||
platform_set_drvdata(dev, card);
|
||||
printk(KERN_INFO "Motu MidiTimePiece on parallel port irq: %d ioport: 0x%lx\n", irq, port);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue