aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Ni <[email protected]>2024-05-28 11:08:32 +0800
committerNeil Armstrong <[email protected]>2024-06-03 10:46:36 +0200
commit629f2b4e05225e53125aaf7ff0b87d5d53897128 (patch)
tree477780f6a33b7a4f77841a641caf64e09f36bf44
parentbb195358806847217efba98de62b7decec3b371f (diff)
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: b27c0f6d208d ("drm/panel: sitronix-st7789v: add panel orientation support") Signed-off-by: Chen Ni <[email protected]> Reviewed-by: Michael Riesch <[email protected]> Acked-by: Jessica Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/panel/panel-sitronix-st7789v.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
index e8f385b9c618..28bfc48a9127 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
@@ -643,7 +643,9 @@ static int st7789v_probe(struct spi_device *spi)
if (ret)
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);