提交 807a7515 编写于 作者: T Tomi Valkeinen

OMAP: DSS2: OMAPFB: fix crash when panel driver was not loaded

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: NTomi Valkeinen <tomi.valkeinen@nokia.com>
上级 2d9c5597
...@@ -2115,6 +2115,11 @@ static int omapfb_probe(struct platform_device *pdev) ...@@ -2115,6 +2115,11 @@ static int omapfb_probe(struct platform_device *pdev)
dssdev = NULL; dssdev = NULL;
for_each_dss_dev(dssdev) { for_each_dss_dev(dssdev) {
omap_dss_get_device(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; fbdev->displays[fbdev->num_displays++] = dssdev;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册