]> 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)
committerKalle Valo <kvalo@kernel.org>
Wed, 27 Jul 2022 12:49:17 +0000 (15:49 +0300)
commit086990576a68607cfd81aadafd5029b73cb26a75
tree4f956be1fa06942a58dae579bb9682bdd0e11d36
parent6a72885547d7ddb0aed6cfa3bc6a1b8838a1f397
wifi: libertas: Fix possible refcount leak in if_usb_probe()

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: cbf0ca3b3a66 ("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
drivers/net/wireless/marvell/libertas/if_usb.c