public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org, Jason Cooper <jason@lakedaemon.net>,
	Andrew Lunn <andrew@lunn.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Subject: [PATCH 2/2] i2c: mv64xxx: propagate the return value of platform_get_irq()
Date: Tue, 16 May 2017 14:07:25 +0200	[thread overview]
Message-ID: <1494936445-27331-2-git-send-email-thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <1494936445-27331-1-git-send-email-thomas.petazzoni@free-electrons.com>

platform_get_irq() returns an error code, so instead of inventing our
own error code (-ENXIO), return the one provided by
platform_get_irq(). Most notably, this allows an -EPROBE_DEFER
returned by platform_get_irq() to be propagate as the return value of
->probe(), which allows deferred probing of the interrupt controller.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 drivers/i2c/busses/i2c-mv64xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index f0a4d15..f0ddf7d 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -918,7 +918,7 @@ mv64xxx_i2c_probe(struct platform_device *pd)
 			goto exit_clk;
 	}
 	if (drv_data->irq < 0) {
-		rc = -ENXIO;
+		rc = drv_data->irq;
 		goto exit_reset;
 	}
 
-- 
2.7.4

  reply	other threads:[~2017-05-16 12:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-16 12:07 [PATCH 1/2] i2c: mv64xxx: use platform_get_irq() instead of irq_of_parse_and_map() Thomas Petazzoni
2017-05-16 12:07 ` Thomas Petazzoni [this message]
2017-05-16 21:28   ` [PATCH 2/2] i2c: mv64xxx: propagate the return value of platform_get_irq() Wolfram Sang
2017-05-16 21:34     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1494936445-27331-2-git-send-email-thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=andrew@lunn.ch \
    --cc=gregory.clement@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-i2c@vger.kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox