]> git.baikalelectronics.ru Git - kernel.git/commit
[media] Corrected Oops on omap_vout when no manager is connected
authorFederico Fuga <fuga@studiofuga.com>
Fri, 24 Aug 2012 14:54:11 +0000 (11:54 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Mar 2013 21:31:51 +0000 (18:31 -0300)
commitd7f51daade1951f57109a0a86d44c37cf1c4a85f
treec92b31a5e1c00693ba39b567caa872a4ffc73b8d
parentd516c0ebba66d54414d756bf86e4b78e0085afbb
[media] Corrected Oops on omap_vout when no manager is connected

If no manager is connected to the vout device, the omapvid_init() function
fails. No error condition is checked, and the device is started. Later on,
when irq is serviced, a NULL pointer dereference occurs.
Also, the isr routine must be registered only if no error occurs, otherwise
the isr triggers without the proper setup, and the kernel oops again.
To prevent this, the error condition is checked, and the streamon function
exits with error. Also the isr registration call is moved after the setup
procedure is completed.

Reviewed-by: Prabhakar Lad <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/omap/omap_vout.c