diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2014-01-04 15:08:05 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-01-04 18:49:00 -0500 |
commit | c36aeba8c072d20a08e8546483494ab0f6458963 (patch) | |
tree | b5e0dcd7ed5bbfef8204d777ccff2e2aed23b18c | |
parent | 4f319e3251937a73719b13397d738640622ba513 (diff) |
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>
-rw-r--r-- | drivers/nfc/port100.c | 1 |
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) | |||
1509 | 1509 | ||
1510 | usb_free_urb(dev->in_urb); | 1510 | usb_free_urb(dev->in_urb); |
1511 | usb_free_urb(dev->out_urb); | 1511 | usb_free_urb(dev->out_urb); |
1512 | usb_put_dev(dev->udev); | ||
1512 | 1513 | ||
1513 | kfree(dev->cmd); | 1514 | kfree(dev->cmd); |
1514 | 1515 | ||