diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2014-05-23 22:47:07 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-06-17 17:04:46 +0200 |
commit | ebdae6507b00c77f51b0c3ef70d25f65699f5644 (patch) | |
tree | b961890e97ea8cefc94e572c5dbe1bb0f94763d3 /drivers/media/usb/usbtv | |
parent | [media] smiapp: I2C address is the last part of the subdev name (diff) | |
download | linux-ebdae6507b00c77f51b0c3ef70d25f65699f5644.tar.xz linux-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>
Diffstat (limited to 'drivers/media/usb/usbtv')
-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; |