Commit 95478b08 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

drm: renesas: shmobile: Improve error handling

Prepare for DT conversion, where panel probe can be deferred, by
streamlining error propagation and handling:
  - Use dev_err_probe() to avoid printing error messages in case of
    probe deferral,
  - Propagate errors where needed.
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/6dfac76e5b1c7dda3f96801ce83845a4235e2ccd.1694767209.git.geert+renesas@glider.be
parent 04ed052f
......@@ -253,7 +253,8 @@ static int shmob_drm_probe(struct platform_device *pdev)
ret = shmob_drm_modeset_init(sdev);
if (ret < 0) {
dev_err(&pdev->dev, "failed to initialize mode setting\n");
dev_err_probe(&pdev->dev, ret,
"failed to initialize mode setting\n");
goto err_free_drm_dev;
}
......
......@@ -157,9 +157,17 @@ int shmob_drm_modeset_init(struct shmob_drm_device *sdev)
if (ret)
return ret;
shmob_drm_crtc_create(sdev);
shmob_drm_encoder_create(sdev);
shmob_drm_connector_create(sdev, &sdev->encoder);
ret = shmob_drm_crtc_create(sdev);
if (ret < 0)
return ret;
ret = shmob_drm_encoder_create(sdev);
if (ret < 0)
return ret;
ret = shmob_drm_connector_create(sdev, &sdev->encoder);
if (ret < 0)
return ret;
drm_kms_helper_poll_init(sdev->ddev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment