[media] tlg2300: fix leak at failure path in poseidon_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 30 May 2014 22:20:11 +0000 (19:20 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 4 Jul 2014 18:45:20 +0000 (15:45 -0300)
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>
drivers/media/usb/tlg2300/pd-main.c

index 3316caa4733b6a48951f14f8e3e483188e325eba..b31f4791b8ffbf51fdaf37ed95f87f3c561a385b 100644 (file)
@@ -476,6 +476,8 @@ err_audio:
 err_video:
        v4l2_device_unregister(&pd->v4l2_dev);
 err_v4l2:
+       usb_put_intf(pd->interface);
+       usb_put_dev(pd->udev);
        kfree(pd);
        return ret;
 }