diff options
author | Dafna Hirschfeld <dafna.hirschfeld@collabora.com> | 2020-05-06 12:14:24 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-05-12 15:19:07 +0200 |
commit | c4f333b758ab4d8d4bc643e8bddac96082e0c379 (patch) | |
tree | 15a71ac161bba8212129d1ea129e5b12c5d50b02 /drivers/pinctrl/pinctrl-rockchip.c | |
parent | pinctrl: mediatek: add pinctrl-mtk-common-v2 module license (diff) | |
download | linux-c4f333b758ab4d8d4bc643e8bddac96082e0c379.tar.xz linux-c4f333b758ab4d8d4bc643e8bddac96082e0c379.zip |
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>
Diffstat (limited to 'drivers/pinctrl/pinctrl-rockchip.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-rockchip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 098951346339..a9299f0bd21e 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; |