Skip to content

Commit 6d0626c

Browse files
Yannick FertrePatrice Chotard
authored andcommitted
video: stm32: dsi: get first panel device
Stop parsing the device tree if a panel was found. Change-Id: I0aef1cbf818da70f1dbd3d6e2536c36876fbee8b Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/451727 ACI: CITOOLS <MDG-smet-aci-reviews@list.st.com> Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com>
1 parent ac51420 commit 6d0626c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/video/stm32/stm32_dsi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,11 +843,13 @@ static int stm32_dsi_get_panel(struct udevice *dev, struct udevice **panel)
843843
}
844844

845845
uclass_get_device_by_ofnode(UCLASS_PANEL, remote, panel);
846+
/* Stop parsing the device tree if a panel was found. */
846847
if (*panel)
847-
break;
848+
goto out;
848849
}
849850
}
850851

852+
out:
851853
/* Sanity check, we can get out of the loop without having a clean ofnode */
852854
if (!(*panel))
853855
ret = -EINVAL;

0 commit comments

Comments
 (0)