linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: zynq: change error code for pinctrl_register failure
@ 2015-05-26  4:18 Masahiro Yamada
  2015-05-26  8:12 ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2015-05-26  4:18 UTC (permalink / raw)
  To: linux-gpio
  Cc: Masahiro Yamada, Sören Brinkmann, Michal Simek,
	Linus Walleij, linux-kernel, linux-arm-kernel

pinctrl_register() could fail for memory unrelated errors.
Returning -EINVAL (or -ENODEV) seems more suitable for here.
At least, the other pinctrl drivers do so.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/pinctrl/pinctrl-zynq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-zynq.c b/drivers/pinctrl/pinctrl-zynq.c
index 04748a4..0ff653c 100644
--- a/drivers/pinctrl/pinctrl-zynq.c
+++ b/drivers/pinctrl/pinctrl-zynq.c
@@ -1141,7 +1141,7 @@ static int zynq_pinctrl_probe(struct platform_device *pdev)
 
 	pctrl->pctrl = pinctrl_register(&zynq_desc, &pdev->dev, pctrl);
 	if (!pctrl->pctrl)
-		return -ENOMEM;
+		return -EINVAL;
 
 	platform_set_drvdata(pdev, pctrl);
 
-- 
1.9.1


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

end of thread, other threads:[~2015-06-01 15:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-26  4:18 [PATCH] pinctrl: zynq: change error code for pinctrl_register failure Masahiro Yamada
2015-05-26  8:12 ` Arnd Bergmann
2015-05-26  8:20   ` Masahiro Yamada
2015-05-26 18:37   ` Sören Brinkmann
2015-05-27  1:18     ` Masahiro Yamada
2015-06-01 15:00     ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).