Yang Yingliang bfce730886 ALSA: ac97: fix possible memory leak in snd_ac97_dev_register()
[ Upstream commit 4881bda5ea05c8c240fc8afeaa928e2bc43f61fa ]

If device_register() fails in snd_ac97_dev_register(), it should
call put_device() to give up reference, or the name allocated in
dev_set_name() is leaked.

Fixes: 0ca06a00e206 ("[ALSA] AC97 bus interface for ad-hoc drivers")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221019093025.1179475-1-yangyingliang@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-11-03 23:57:51 +09:00
..
2022-05-30 09:33:45 +02:00
2020-11-19 18:26:30 +01:00
2020-01-05 16:14:47 +01:00
2020-01-05 16:14:30 +01:00
2020-07-09 13:01:29 +02:00
2020-07-09 13:01:29 +02:00
2020-01-05 16:15:10 +01:00
2020-01-05 16:15:11 +01:00
2020-07-07 12:12:21 +02:00
2021-11-26 10:39:10 +01:00
2020-01-28 16:26:57 -08:00
2020-01-28 16:26:57 -08:00
2020-01-28 16:26:57 -08:00