linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] gpio: mxc: Do not hard code return value
@ 2013-12-21  7:35 Sachin Kamat
  2013-12-21  7:35 ` [PATCH 2/2] gpio: mvebu: Do not hard code error code Sachin Kamat
  2014-01-02 12:56 ` [PATCH 1/2] gpio: mxc: Do not hard code return value Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Sachin Kamat @ 2013-12-21  7:35 UTC (permalink / raw)
  To: linux-gpio; +Cc: linus.walleij, sachin.kamat

Silences the following warning:
why not propagate 'port->irq' from platform_get_irq() instead of (-22)?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/gpio/gpio-mxc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index 3307f6db3a92..db83b3c0a449 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -422,7 +422,7 @@ static int mxc_gpio_probe(struct platform_device *pdev)
 	port->irq_high = platform_get_irq(pdev, 1);
 	port->irq = platform_get_irq(pdev, 0);
 	if (port->irq < 0)
-		return -EINVAL;
+		return port->irq;
 
 	/* disable the interrupt and clear the status */
 	writel(0, port->base + GPIO_IMR);
-- 
1.7.9.5


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

end of thread, other threads:[~2014-01-02 12:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-21  7:35 [PATCH 1/2] gpio: mxc: Do not hard code return value Sachin Kamat
2013-12-21  7:35 ` [PATCH 2/2] gpio: mvebu: Do not hard code error code Sachin Kamat
2014-01-02 12:57   ` Linus Walleij
2014-01-02 12:56 ` [PATCH 1/2] gpio: mxc: Do not hard code return value 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).