summaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2014-01-05 00:08:05 +0400
committerSamuel Ortiz <sameo@linux.intel.com>2014-01-05 00:49:00 +0100
commitc36aeba8c072d20a08e8546483494ab0f6458963 (patch)
treeb5e0dcd7ed5bbfef8204d777ccff2e2aed23b18c /drivers/nfc
parent4f319e3251937a73719b13397d738640622ba513 (diff)
downloadlinux-c36aeba8c072d20a08e8546483494ab0f6458963.tar.bz2
NFC: port100: Fix device leak
port100_probe() calls usb_get_dev(), but there is no usb_put_dev() in port100_disconnect(). The patch adds one. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/port100.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nfc/port100.c b/drivers/nfc/port100.c
index 8a0571eb2627..a8555f81cbba 100644
--- a/drivers/nfc/port100.c
+++ b/drivers/nfc/port100.c
@@ -1509,6 +1509,7 @@ static void port100_disconnect(struct usb_interface *interface)
usb_free_urb(dev->in_urb);
usb_free_urb(dev->out_urb);
+ usb_put_dev(dev->udev);
kfree(dev->cmd);