commit | e7f66385fef50ae39032d7e0610fe6874163533e | [log] [tgz] |
---|---|---|
author | Patrick Delaunay <patrick.delaunay@st.com> | Wed Sep 09 18:28:34 2020 +0200 |
committer | Patrick Delaunay <patrick.delaunay@st.com> | Fri Oct 02 15:05:14 2020 +0200 |
tree | f01d73c72b38ea5bd27ff5deda3bfb311571f923 | |
parent | cd7c951787c1cea67da9412179b647b2d63b9840 [diff] |
gpio: stm32: check result of ofnode_phandle_args 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@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>