Commit e7d40c37 authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Mauro Carvalho Chehab

[media] tlg2300: fix leak at failure path in poseidon_probe()

Error handling code in poseidon_probe() misses usb_put_intf()
and usb_put_dev().

Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent eeff336c
......@@ -476,6 +476,8 @@ static int poseidon_probe(struct usb_interface *interface,
err_video:
v4l2_device_unregister(&pd->v4l2_dev);
err_v4l2:
usb_put_intf(pd->interface);
usb_put_dev(pd->udev);
kfree(pd);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment