Skip to content

Commit

Permalink
[media] omap_vout: fix crash if no driver for a display
Browse files Browse the repository at this point in the history
omap_vout crashes on start if a corresponding driver is not loaded for a
display device.

This patch changes omap_vout init sequence to skip devices without a
driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Tomi Valkeinen authored and Mauro Carvalho Chehab committed Dec 7, 2011
1 parent fc8ac77 commit 71c7a97
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/media/video/omap/omap_vout.c
Original file line number Diff line number Diff line change
Expand Up @@ -2169,6 +2169,14 @@ static int __init omap_vout_probe(struct platform_device *pdev)
vid_dev->num_displays = 0;
for_each_dss_dev(dssdev) {
omap_dss_get_device(dssdev);

if (!dssdev->driver) {
dev_warn(&pdev->dev, "no driver for display: %s\n",
dssdev->name);
omap_dss_put_device(dssdev);
continue;
}

vid_dev->displays[vid_dev->num_displays++] = dssdev;
}

Expand Down

0 comments on commit 71c7a97

Please sign in to comment.