From ebdae6507b00c77f51b0c3ef70d25f65699f5644 Mon Sep 17 00:00:00 2001 From: Alexey Khoroshilov Date: Fri, 23 May 2014 17:47:07 -0300 Subject: [PATCH] [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 Acked-by: Lubomir Rintel Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/usbtv/usbtv-core.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.20.1