]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
pinctrl: single: check for any error when getting rows
authorAxel Haslam <ahaslam@baylibre.com>
Wed, 9 Nov 2016 14:54:00 +0000 (15:54 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 11 Nov 2016 20:28:07 +0000 (21:28 +0100)
commitde7416bcee3f7c9004fff92795a03a46f3f40316
tree3b89455382d1802e86fd245cfd26f1b2802e33d5
parent95bdb0ea3668d86513376e0e88e88f5c0202acba
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: Axel Haslam <ahaslam@baylibre.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-single.c