diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index d17caef6915a96006c97c04f9e9768f88515ca2a..973bf79380864cc445d8841b51745fa829b41885 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -2111,18 +2111,23 @@ static int omapfb_probe(struct platform_device *pdev) fbdev->dev = &pdev->dev; platform_set_drvdata(pdev, fbdev); + r = 0; fbdev->num_displays = 0; 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; + r = -ENODEV; } + fbdev->displays[fbdev->num_displays++] = dssdev; } + if (r) + goto cleanup; + if (fbdev->num_displays == 0) { dev_err(&pdev->dev, "no displays\n"); r = -EINVAL;