Commit e4a8844c authored by Heiko Stübner's avatar Heiko Stübner Committed by Linus Walleij

pinctrl: handle zero found dt pinconfig properties better

This adds a shortcut when no valid pinconf properties are found
in the parsed dt node, to set the values immediately and return.
Suggested-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Reviewed-by: default avatarJames Hogan <james.hogan@imgtec.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 9ee1f7d2
...@@ -208,6 +208,13 @@ int pinconf_generic_parse_dt_config(struct device_node *np, ...@@ -208,6 +208,13 @@ int pinconf_generic_parse_dt_config(struct device_node *np,
ncfg++; ncfg++;
} }
/* no configs found at all */
if (ncfg == 0) {
*configs = NULL;
*nconfigs = 0;
return 0;
}
/* /*
* Now limit the number of configs to the real number of * Now limit the number of configs to the real number of
* found properties. * found properties.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment