Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -208,6 +208,13 @@ int pinconf_generic_parse_dt_config(struct device_node *np,
		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
	 * found properties.