summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54
diff options
context:
space:
mode:
authorAlexey Khoroshilov2013-09-17 22:57:59 +0200
committerJohn W. Linville2013-09-26 20:02:29 +0200
commite78641c19de7a3b77b5d840aff239c6648983099 (patch)
treeac06b89052d53014b0d6768641f9f4cd5904fa89 /drivers/net/wireless/p54
parentath9k: don't use BAW tracking on PS responses for non-AMPDU packets (diff)
downloadkernel-qcow2-linux-e78641c19de7a3b77b5d840aff239c6648983099.tar.gz
kernel-qcow2-linux-e78641c19de7a3b77b5d840aff239c6648983099.tar.xz
kernel-qcow2-linux-e78641c19de7a3b77b5d840aff239c6648983099.zip
p54usb: fix leak at failure path in p54u_load_firmware()
If request_firmware_nowait() fails in p54u_load_firmware(), p54u_load_firmware_cb is not called and no one decrements usb_dev refcnt. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54')
-rw-r--r--drivers/net/wireless/p54/p54usb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index b9deef66cf4b..7fa81d13b4e5 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -979,6 +979,7 @@ static int p54u_load_firmware(struct ieee80211_hw *dev,
if (err) {
dev_err(&priv->udev->dev, "(p54usb) cannot load firmware %s "
"(%d)!\n", p54u_fwlist[i].fw, err);
+ usb_put_dev(udev);
}
return err;