Commit 629f2b4e authored by Chen Ni's avatar Chen Ni Committed by Neil Armstrong

drm/panel: sitronix-st7789v: Add check for of_drm_get_panel_orientation

Add check for the return value of of_drm_get_panel_orientation() and
return the error if it fails in order to catch the error.

Fixes: b27c0f6d ("drm/panel: sitronix-st7789v: add panel orientation support")
Signed-off-by: default avatarChen Ni <nichen@iscas.ac.cn>
Reviewed-by: default avatarMichael Riesch <michael.riesch@wolfvision.net>
Acked-by: default avatarJessica Zhang <quic_jesszhan@quicinc.com>
Link: https://lore.kernel.org/r/20240528030832.2529471-1-nichen@iscas.ac.cnSigned-off-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240528030832.2529471-1-nichen@iscas.ac.cn
parent bb195358
...@@ -643,7 +643,9 @@ static int st7789v_probe(struct spi_device *spi) ...@@ -643,7 +643,9 @@ static int st7789v_probe(struct spi_device *spi)
if (ret) if (ret)
return dev_err_probe(dev, ret, "Failed to get backlight\n"); return dev_err_probe(dev, ret, "Failed to get backlight\n");
of_drm_get_panel_orientation(spi->dev.of_node, &ctx->orientation); ret = of_drm_get_panel_orientation(spi->dev.of_node, &ctx->orientation);
if (ret)
return dev_err_probe(&spi->dev, ret, "Failed to get orientation\n");
drm_panel_add(&ctx->panel); drm_panel_add(&ctx->panel);
......
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