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: a0f160ffcb
("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>
This commit is contained in:
Родитель
077db34c2b
Коммит
839930ca1b
|
@ -119,7 +119,7 @@ static int apple_gpio_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
dev_err(pctl->dev,
|
||||
"missing or empty pinmux property in node %pOFn.\n",
|
||||
node);
|
||||
return ret;
|
||||
return ret ? ret : -EINVAL;
|
||||
}
|
||||
|
||||
num_pins = ret;
|
||||
|
|
Загрузка…
Ссылка в новой задаче