pinctrl: apple: return an error if pinmux is missing in the DT
authorJoey Gouly <joey.gouly@arm.com>
Sun, 21 Nov 2021 16:56:42 +0000 (16:56 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 26 Nov 2021 23:55:14 +0000 (00:55 +0100)
commit839930ca1bd0c79cdf370d11462ef4a81b664e44
tree4c48bffc281d2c974a8693dd8d39dae9dc7b7f50
parent077db34c2b007a086baa3ee87bc72794a25d0329
pinctrl: apple: return an error if pinmux is missing in the DT

If of_property_count_u32_elems returned 0, return -EINVAL to indicate
a failure. Previously this would return 0.

Fixes: a0f160ffcb83 ("pinctrl: add pinctrl/GPIO driver for Apple SoCs")
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20211121165642.27883-12-joey.gouly@arm.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-apple-gpio.c