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

[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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
}