Skip to content
Commit de7416bc authored by Axel Haslam's avatar Axel Haslam Committed by Linus Walleij
Browse files

pinctrl: single: check for any error when getting rows



pinctrl_count_index_with_args returns -ENOENT not
-EINVAL. The return check would pass, and we would
try to kzalloc with a negative error size throwing
a warning.

Instead of checking for -EINVAL specifically, lets
check for any error and avoid negative size allocations.

Signed-off-by: default avatarAxel Haslam <ahaslam@baylibre.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 95bdb0ea
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