Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: rockchip: return ENOMEM instead of EINVAL if allocation fails

The function rockchip_pinctrl_parse_dt returns -EINVAL if
allocation fails. Change the return error to -ENOMEM

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20200506101424.15691-1-dafna.hirschfeld@collabora.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Dafna Hirschfeld and committed by
Linus Walleij
c4f333b7 c7acd6fe

+2 -2
+2 -2
drivers/pinctrl/pinctrl-rockchip.c
··· 2940 2940 sizeof(struct rockchip_pmx_func), 2941 2941 GFP_KERNEL); 2942 2942 if (!info->functions) 2943 - return -EINVAL; 2943 + return -ENOMEM; 2944 2944 2945 2945 info->groups = devm_kcalloc(dev, 2946 2946 info->ngroups, 2947 2947 sizeof(struct rockchip_pin_group), 2948 2948 GFP_KERNEL); 2949 2949 if (!info->groups) 2950 - return -EINVAL; 2950 + return -ENOMEM; 2951 2951 2952 2952 i = 0; 2953 2953