aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2014-01-27 12:25:47 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-01-27 22:34:49 -0800
commit1f906f8376c2d53dca347b15c0caef71d91087b4 (patch)
treedfe8e493d0adad819031e098717c6b903c5638b8 /drivers/input/tablet
parentInput: wistron_btns - add FS AMILO Pro 8210 support (diff)
downloadlinux-dev-1f906f8376c2d53dca347b15c0caef71d91087b4.tar.xz
linux-dev-1f906f8376c2d53dca347b15c0caef71d91087b4.zip
Input: gtco - fix usb_dev leak
There is usb_get_dev() in gtco_probe(), but there is no usb_put_dev() anywhere in the driver. As pointed out by Dmitry Torokhov: The lifetime of gtco structure is already directly tied to lifetime of usb_dev: when destroying usb_dev driver core will call remove() function of currently bound driver (in our case gtco) which will destroy gtco memory. Taking additional reference is not needed here. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r--drivers/input/tablet/gtco.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c
index caecffe8caff..858045694e9d 100644
--- a/drivers/input/tablet/gtco.c
+++ b/drivers/input/tablet/gtco.c
@@ -848,7 +848,7 @@ static int gtco_probe(struct usb_interface *usbinterface,
gtco->inputdevice = input_dev;
/* Save interface information */
- gtco->usbdev = usb_get_dev(interface_to_usbdev(usbinterface));
+ gtco->usbdev = interface_to_usbdev(usbinterface);
gtco->intf = usbinterface;
/* Allocate some data for incoming reports */