+5
−5
Loading
If ac97_add_adapter() fails, put_device() is the correct way to drop the device reference. kfree() is not required. Add kfree() if idr_alloc() fails and in ac97_adapter_release() to do the cleanup. Found by code review. Fixes: 74426fbf ("ALSA: ac97: add an ac97 bus") Cc: stable@vger.kernel.org Signed-off-by:Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> Link: https://patch.msgid.link/20251219162845.657525-1-lihaoxiang@isrc.iscas.ac.cn Signed-off-by:
Takashi Iwai <tiwai@suse.de>