From: Alexey Khoroshilov Date: Sat, 4 Jan 2014 20:08:05 +0000 (+0400) Subject: NFC: port100: Fix device leak X-Git-Tag: upstream/snapshot3+hdmi~3572^2~3^2^2~44^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c36aeba8c072d20a08e8546483494ab0f6458963;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Samuel Ortiz --- diff --git a/drivers/nfc/port100.c b/drivers/nfc/port100.c index 8a0571e..a8555f8 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);