Skip to content
Commit b97760ae authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij
Browse files

pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map()



Smatch complains about this condition:

	if (has_config && num_pins >= 1)

The "has_config" variable is either uninitialized or true.  The
"num_pins" variable is unsigned and we verified that it is non-zero on
the lines before so we know "num_pines >= 1" is true.  Really, we could
just check "num_configs" directly and remove the "has_config" variable.

Fixes: 77618084 ("pinctrl: introduce driver for Atmel PIO4 controller")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarLudovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 89c68b10
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment