[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: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
Alexey Khoroshilov 2014-05-30 19:20:11 -03:00 committed by Mauro Carvalho Chehab
parent eeff336ccf
commit e7d40c3721
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}