diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2014-05-23 17:47:07 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-30 12:35:42 -0300 |
commit | 1faf516f8822e611cc3d51f28c25b44c6b609f10 (patch) | |
tree | cd221ebe1392bb7683cdbf024fcf0bc4d2cc49a1 | |
parent | 2d7e62f4101c6a5c0bf6c2727df3cbca17381393 (diff) | |
download | lwn-1faf516f8822e611cc3d51f28c25b44c6b609f10.tar.gz lwn-1faf516f8822e611cc3d51f28c25b44c6b609f10.zip |
[media] usbtv: fix leak at failure path in usbtv_probe()
Error handling code in usbtv_probe() misses usb_put_dev().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/usb/usbtv/usbtv-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/usb/usbtv/usbtv-core.c b/drivers/media/usb/usbtv/usbtv-core.c index 2f87ddfa469f..473fab81b602 100644 --- a/drivers/media/usb/usbtv/usbtv-core.c +++ b/drivers/media/usb/usbtv/usbtv-core.c @@ -91,6 +91,8 @@ static int usbtv_probe(struct usb_interface *intf, return 0; usbtv_video_fail: + usb_set_intfdata(intf, NULL); + usb_put_dev(usbtv->udev); kfree(usbtv); return ret; |