Re: [PATCH] pinctrl: single: check for any error when getting rows

2016-11-09 Thread Tony Lindgren
* Axel Haslam [161109 07:19]: > 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

[PATCH] pinctrl: single: check for any error when getting rows

2016-11-09 Thread Axel Haslam
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