]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: libertas: Fix possible refcount leak in if_usb_probe()
authorHangyu Hua <hbh25y@gmail.com>
Mon, 20 Jun 2022 09:23:50 +0000 (17:23 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:34 +0000 (14:23 +0200)
commitdd32c02cce5111ddab01f8733844e8ada95006ea
tree541396ecb31132211866f2489ce13af5d0fcf055
parentbb149682242d8520c35ce479befd5c6bf9f1b32b
wifi: libertas: Fix possible refcount leak in if_usb_probe()

[ Upstream commit ad2bd1adaeccda2bbce08ec4d840365f0671abf3 ]

usb_get_dev will be called before lbs_get_firmware_async which means that
usb_put_dev need to be called when lbs_get_firmware_async fails.

Fixes: 927f5e997ad1 ("libertas USB: convert to asynchronous firmware loading")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220620092350.39960-1-hbh25y@gmail.com
Link: https://lore.kernel.org/r/20220622113402.16969-1-colin.i.king@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/marvell/libertas/if_usb.c