Message ID | 1501049292-887-1-git-send-email-dev@kresin.me |
---|---|
State | Accepted |
Delegated to: | Mathias Kresin |
Headers | show |
On 26/07/17 08:08, Mathias Kresin wrote: > Children of the pinctrl0 node are optional. Return EINVAL (=missing) > instead of 0. Fixes a hang if the pinctrl0 has no children. > > Signed-off-by: Mathias Kresin <dev@kresin.me> Acked-by: John Crispin <john@phrozen.org> > --- > .../ramips/patches-4.9/0025-pinctrl-ralink-add-pinctrl-driver.patch | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/linux/ramips/patches-4.9/0025-pinctrl-ralink-add-pinctrl-driver.patch b/target/linux/ramips/patches-4.9/0025-pinctrl-ralink-add-pinctrl-driver.patch > index 6e0d643..dc45852 100644 > --- a/target/linux/ramips/patches-4.9/0025-pinctrl-ralink-add-pinctrl-driver.patch > +++ b/target/linux/ramips/patches-4.9/0025-pinctrl-ralink-add-pinctrl-driver.patch > @@ -193,7 +193,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> > + } > + > + if (!max_maps) > -+ return max_maps; > ++ return -EINVAL; > + > + *map = kzalloc(max_maps * sizeof(struct pinctrl_map), GFP_KERNEL); > + if (!*map)
diff --git a/target/linux/ramips/patches-4.9/0025-pinctrl-ralink-add-pinctrl-driver.patch b/target/linux/ramips/patches-4.9/0025-pinctrl-ralink-add-pinctrl-driver.patch index 6e0d643..dc45852 100644 --- a/target/linux/ramips/patches-4.9/0025-pinctrl-ralink-add-pinctrl-driver.patch +++ b/target/linux/ramips/patches-4.9/0025-pinctrl-ralink-add-pinctrl-driver.patch @@ -193,7 +193,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + } + + if (!max_maps) -+ return max_maps; ++ return -EINVAL; + + *map = kzalloc(max_maps * sizeof(struct pinctrl_map), GFP_KERNEL); + if (!*map)
Children of the pinctrl0 node are optional. Return EINVAL (=missing) instead of 0. Fixes a hang if the pinctrl0 has no children. Signed-off-by: Mathias Kresin <dev@kresin.me> --- .../ramips/patches-4.9/0025-pinctrl-ralink-add-pinctrl-driver.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)