[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1432613909-13457-1-git-send-email-yamada.masahiro@socionext.com>
Date: Tue, 26 May 2015 13:18:29 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: linux-gpio@...r.kernel.org
Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>,
Sören Brinkmann <soren.brinkmann@...inx.com>,
Michal Simek <michal.simek@...inx.com>,
Linus Walleij <linus.walleij@...aro.org>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: [PATCH] pinctrl: zynq: change error code for pinctrl_register failure
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@...ionext.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists