libertas: Fix possible refcount leak in if_usb_probe()
Subsystems (3)
PATCH 1/1 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 ce84bb69f50e ("libertas USB: convert to asynchronous firmware loading")
Signed-off-by Hangyu Hua <[email protected]>
--- drivers/net/wireless/marvell/libertas/if_usb.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/marvell/libertas/if_usb.c +1 -0
@@ -287,6 +287,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);
Signature · 1 line
2.25.1
Re: wifi: libertas: Fix possible refcount leak in if_usb_probe()
Quoted 5 lines · Hangyu Hua
usb_get_devwill be called beforelbs_get_firmware_asyncwhich means thatusb_put_devneed to be called whenlbs_get_firmware_asyncfails.Fixes ce84bb69f50e ("libertas USB: convert to asynchronous firmware loading")Signed-off-by Hangyu Hua <[email protected]>
Patch applied to wireless-next.git, thanks.
2cfb08d6c5c9 wifi: libertas: Fix possible refcount leak in if_usb_probe()
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches