2016-02-20 22:30:53

by Alexey Khoroshilov

[permalink] [raw]
Subject: at76c50x-usb: usb_put_dev() if at76_load_internal_fw() succeed

I do not see any reason to call usb_put_dev() if at76_load_internal_fw() succeed.
But it is here from the very beginning. Any suggestions?

--
Thank you,
Alexey



2016-02-20 22:31:04

by Alexey Khoroshilov

[permalink] [raw]
Subject: [PATCH] at76c50x-usb: avoid double usb_put_dev() after downloading internal firmware in at76_probe()

There is no need in usb_put_dev() if at76_load_internal_fw() succeed.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <[email protected]>
---
drivers/net/wireless/atmel/at76c50x-usb.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c
index dab25136214a..1efb1d66e0b7 100644
--- a/drivers/net/wireless/atmel/at76c50x-usb.c
+++ b/drivers/net/wireless/atmel/at76c50x-usb.c
@@ -2481,9 +2481,7 @@ static int at76_probe(struct usb_interface *interface,
dev_err(&interface->dev,
"error %d downloading internal firmware\n",
ret);
- goto exit;
}
- usb_put_dev(udev);
goto exit;
}

--
1.9.1


2016-03-07 12:24:40

by Kalle Valo

[permalink] [raw]
Subject: Re: at76c50x-usb: avoid double usb_put_dev() after downloading internalfirmware in at76_probe()


> There is no need in usb_put_dev() if at76_load_internal_fw() succeed.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov <[email protected]>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo