mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
wifi: libertas: Fix possible refcount leak in if_usb_probe()
[ Upstream commit6fd57e1d12
] 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:ce84bb69f5
("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>
This commit is contained in:
parent
b13c84e877
commit
61b2ec9748
1 changed files with 1 additions and 0 deletions
|
@ -283,6 +283,7 @@ static int if_usb_probe(struct usb_interface *intf,
|
|||
return 0;
|
||||
|
||||
err_get_fw:
|
||||
usb_put_dev(udev);
|
||||
lbs_remove_card(priv);
|
||||
err_add_card:
|
||||
if_usb_reset_device(cardp);
|
||||
|
|
Loading…
Reference in a new issue