[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1395440450-21178-1-git-send-email-khoroshilov@ispras.ru>
Date: Sat, 22 Mar 2014 02:20:50 +0400
From: Alexey Khoroshilov <khoroshilov@...ras.ru>
To: Lauro Ramos Venancio <lauro.venancio@...nbossa.org>,
Aloisio Almeida Jr <aloisio.almeida@...nbossa.org>,
Samuel Ortiz <sameo@...ux.intel.com>
Cc: Alexey Khoroshilov <khoroshilov@...ras.ru>,
linux-wireless@...r.kernel.org, linux-nfc@...ts.01.org,
linux-kernel@...r.kernel.org, ldv-project@...uxtesting.org
Subject: [PATCH] NFC: pn533: Fix device leak
pn533_probe() calls usb_get_dev(), but there is no usb_put_dev()
in pn533_disconnect(). The patch adds one.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>
---
drivers/nfc/pn533.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c
index cf1a87bb74f8..fed19d5473bb 100644
--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -3301,6 +3301,7 @@ static void pn533_disconnect(struct usb_interface *interface)
usb_free_urb(dev->in_urb);
usb_free_urb(dev->out_urb);
+ usb_put_dev(dev->udev);
kfree(dev);
nfc_info(&interface->dev, "NXP PN533 NFC device disconnected\n");
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists