diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2014-05-23 17:47:07 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-06-17 12:04:46 -0300 |
commit | ebdae6507b00c77f51b0c3ef70d25f65699f5644 (patch) | |
tree | b961890e97ea8cefc94e572c5dbe1bb0f94763d3 | |
parent | f8d36b8960019da9ba46721bd541af61d7497a00 (diff) | |
download | lwn-ebdae6507b00c77f51b0c3ef70d25f65699f5644.tar.gz lwn-ebdae6507b00c77f51b0c3ef70d25f65699f5644.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; |