Skip to content

Commit

Permalink
OMAP: DSS2: OMAPFB: fix crash when panel driver was not loaded
Browse files Browse the repository at this point in the history
If the panel's probe had failed, omapfb would still go on, eventually
crashing.

A better fix would be to handle each display properly, and leaving just
the failed display out. But that is a bigger change.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
  • Loading branch information
Tomi Valkeinen committed Jan 12, 2010
1 parent 2d9c559 commit 807a751
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/video/omap2/omapfb/omapfb-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2115,6 +2115,11 @@ static int omapfb_probe(struct platform_device *pdev)
dssdev = NULL;
for_each_dss_dev(dssdev) {
omap_dss_get_device(dssdev);
if (!dssdev->driver) {
dev_err(&pdev->dev, "no driver for display\n");
r = -EINVAL;
goto cleanup;
}
fbdev->displays[fbdev->num_displays++] = dssdev;
}

Expand Down

0 comments on commit 807a751

Please sign in to comment.