Thread (6 messages) 6 messages, 4 authors, 2015-06-01

[PATCH] pinctrl: zynq: change error code for pinctrl_register failure

From: Masahiro Yamada <hidden>
Date: 2015-05-27 01:19:03
Also in: linux-gpio, lkml

Hi S?ren,

2015-05-27 3:37 GMT+09:00 S?ren Brinkmann [off-list ref]:
On Tue, 2015-05-26 at 10:12AM +0200, Arnd Bergmann wrote:
quoted
On Tuesday 26 May 2015 13:18:29 Masahiro Yamada wrote:
quoted
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);
One choice seems as bad as the other to me ;-)

Could we add a pinctrl_register_reason() variant that returns a meaningful
error code as ERR_PTR?
I agree with Arnd. As long as we don't get a precise error code we can
just keep the current one.
OK. Let's not do this way.


I will try pinctrl_register_reason().



-- 
Best Regards
Masahiro Yamada
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help