提交 ebdae650 编写于 作者: A Alexey Khoroshilov 提交者: Mauro Carvalho Chehab

[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: NAlexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: NLubomir Rintel <lkundrak@v3.sk>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 f8d36b89
...@@ -91,6 +91,8 @@ static int usbtv_probe(struct usb_interface *intf, ...@@ -91,6 +91,8 @@ static int usbtv_probe(struct usb_interface *intf,
return 0; return 0;
usbtv_video_fail: usbtv_video_fail:
usb_set_intfdata(intf, NULL);
usb_put_dev(usbtv->udev);
kfree(usbtv); kfree(usbtv);
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册