diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2014-01-04 21:08:05 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-01-05 00:49:00 +0100 |
commit | c36aeba8c072d20a08e8546483494ab0f6458963 (patch) | |
tree | b5e0dcd7ed5bbfef8204d777ccff2e2aed23b18c /drivers/nfc | |
parent | NFC: digital: Use NFC_NFCID3_MAXSIZE from nfc.h (diff) | |
download | linux-c36aeba8c072d20a08e8546483494ab0f6458963.tar.xz linux-c36aeba8c072d20a08e8546483494ab0f6458963.zip |
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.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) usb_free_urb(dev->in_urb); usb_free_urb(dev->out_urb); + usb_put_dev(dev->udev); kfree(dev->cmd); |