public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: rockchip: return ENOMEM instead of EINVAL if allocation fails
@ 2020-05-06 10:14 Dafna Hirschfeld
  2020-05-06 10:51 ` Heiko Stübner
  2020-05-12 13:19 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Dafna Hirschfeld @ 2020-05-06 10:14 UTC (permalink / raw)
  To: linux-gpio, linux-rockchip
  Cc: helen.koike, dafna.hirschfeld, ezequiel, dafna3, kernel,
	linus.walleij, heiko

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>
---
 drivers/pinctrl/pinctrl-rockchip.c | 4 ++--
 1 file 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;
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-12 13:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-06 10:14 [PATCH] pinctrl: rockchip: return ENOMEM instead of EINVAL if allocation fails Dafna Hirschfeld
2020-05-06 10:51 ` Heiko Stübner
2020-05-12 13:19 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox