]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe()
authorLi Yang <lidaxian@hust.edu.cn>
Thu, 20 Apr 2023 14:08:31 +0000 (22:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:37:20 +0000 (08:37 +0200)
commitfe9cdc19861950582f077f254a12026e169eaee5
treeaff29c86325f59f838b9ee62c5549eb19385c0f4
parent1531ba3fab513b41c093f32360143ecce01bc96d
usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe()

[ Upstream commit 342161c11403ea00e9febc16baab1d883d589d04 ]

Smatch reports:
drivers/usb/phy/phy-tahvo.c: tahvo_usb_probe()
warn: missing unwind goto?

After geting irq, if ret < 0, it will return without error handling to
free memory.
Just add error handling to fix this problem.

Fixes: 0d45a1373e66 ("usb: phy: tahvo: add IRQ check")
Signed-off-by: Li Yang <lidaxian@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Link: https://lore.kernel.org/r/20230420140832.9110-1-lidaxian@hust.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/phy/phy-tahvo.c