From: Dafna Hirschfeld Date: Wed, 6 May 2020 10:14:24 +0000 (+0200) Subject: pinctrl: rockchip: return ENOMEM instead of EINVAL if allocation fails X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c4f333b758ab4d8d4bc643e8bddac96082e0c379;p=linux.git 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 Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20200506101424.15691-1-dafna.hirschfeld@collabora.com Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 0989513463393..a9299f0bd21ef 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -2940,14 +2940,14 @@ static int rockchip_pinctrl_parse_dt(struct platform_device *pdev, sizeof(struct rockchip_pmx_func), GFP_KERNEL); if (!info->functions) - return -EINVAL; + return -ENOMEM; info->groups = devm_kcalloc(dev, info->ngroups, sizeof(struct rockchip_pin_group), GFP_KERNEL); if (!info->groups) - return -EINVAL; + return -ENOMEM; i = 0;