Skip to content

Commit 629f2b4

Browse files
Chen Nisuperna9999
authored andcommitted
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: b27c0f6 ("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]
1 parent bb19535 commit 629f2b4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/panel/panel-sitronix-st7789v.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,9 @@ static int st7789v_probe(struct spi_device *spi)
643643
if (ret)
644644
return dev_err_probe(dev, ret, "Failed to get backlight\n");
645645

646-
of_drm_get_panel_orientation(spi->dev.of_node, &ctx->orientation);
646+
ret = of_drm_get_panel_orientation(spi->dev.of_node, &ctx->orientation);
647+
if (ret)
648+
return dev_err_probe(&spi->dev, ret, "Failed to get orientation\n");
647649

648650
drm_panel_add(&ctx->panel);
649651

0 commit comments

Comments
 (0)