[PATCH 2/2] gpio: stm32: check result of ofnode_phandle_args
Patrick DELAUNAY
patrick.delaunay at st.com
Fri Oct 2 15:14:14 CEST 2020
Hi,
> From: Patrick DELAUNAY <patrick.delaunay at st.com>
>
> Add test on the size of ofnode_phandle_args result to avoid access to uninitialized
> elements in args[] field.
>
> This patch avoids the issue when gpio-ranges cell size is not 3 as expected, for
> example:
> gpio-ranges = <&pinctrl 0>;
> instead of
> gpio-ranges = <&pinctrl 0 112 16>;
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> ---
>
> drivers/gpio/stm32_gpio.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
Applied to u-boot-stm/next, thanks!
Regards
Patrick
More information about the U-Boot
mailing list