aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-4.9
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-07-25 20:23:28 +0200
committerMathias Kresin <dev@kresin.me>2017-07-27 09:12:15 +0200
commita3995a678551c699c9702ed28003c2ba868d2db1 (patch)
tree209d18f8dbb3fdd133b87aa34f303183d3009aea /target/linux/ramips/patches-4.9
parentbf5d32af2a675f7577b388b5eef2a11e6ce042eb (diff)
downloadupstream-a3995a678551c699c9702ed28003c2ba868d2db1.tar.gz
upstream-a3995a678551c699c9702ed28003c2ba868d2db1.tar.bz2
upstream-a3995a678551c699c9702ed28003c2ba868d2db1.zip
ramips: pinctrl: return proper error if pinctrl0 is empty
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>
Diffstat (limited to 'target/linux/ramips/patches-4.9')
-rw-r--r--target/linux/ramips/patches-4.9/0025-pinctrl-ralink-add-pinctrl-driver.patch2
1 files changed, 1 insertions, 1 deletions
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 6e0d6431f0..dc4585231b 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)