carl9170_usb_probe() does not handle request_firmware_nowait() failure
that leads to several leaks in this case.
The patch adds all required deallocations.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <redacted>
---
drivers/net/wireless/ath/carl9170/usb.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
I guess you meant to also free: usb_put_dev(ar->udev)
udev and ar->udev are equal, so technically the patch is correct.
I agree that there is some inconsistency, but I would prefer to fix it
at usb_get_dev() side with a comment about reasons for the double get.
--
Alexey
I guess you meant to also free: usb_put_dev(ar->udev)
udev and ar->udev are equal, so technically the patch is correct.
I agree that there is some inconsistency, but I would prefer to fix
it at usb_get_dev() side with a comment about reasons for the double
get.
What is the reason for the double get?
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
I guess you meant to also free: usb_put_dev(ar->udev)
udev and ar->udev are equal, so technically the patch is correct.
I agree that there is some inconsistency, but I would prefer to fix
it at usb_get_dev() side with a comment about reasons for the double
get.
What is the reason for the double get?
The idea is:
One (extra) reference protects the asynchronous firmware loader callback
from disappearing "udev".
Regards,
Chr