From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: [PATCH] sata_rcar: fix error return code in sata_rcar_probe()
Date: Fri, 30 Jun 2017 00:22:10 -0500 [thread overview]
Message-ID: <20170630052210.GA19186@embeddedgus> (raw)
Print error message and propagate the return value of
platform_get_irq on failure.
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
drivers/ata/sata_rcar.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index ee98447..c936b2a 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -872,8 +872,10 @@ static int sata_rcar_probe(struct platform_device *pdev)
int ret = 0;
irq = platform_get_irq(pdev, 0);
- if (irq <= 0)
- return -EINVAL;
+ if (irq < 0) {
+ dev_err(&pdev->dev, "failed to get IRQ\n");
+ return irq;
+ }
priv = devm_kzalloc(&pdev->dev, sizeof(struct sata_rcar_priv),
GFP_KERNEL);
--
2.5.0
next reply other threads:[~2017-06-30 5:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-30 5:22 Gustavo A. R. Silva [this message]
2017-06-30 9:42 ` [PATCH] sata_rcar: fix error return code in sata_rcar_probe() Sergei Shtylyov
2017-06-30 12:01 ` Tejun Heo
2017-06-30 19:36 ` Gustavo A. R. Silva
2017-06-30 19:42 ` Sergei Shtylyov
2017-06-30 19:54 ` Gustavo A. R. Silva
2017-06-30 19:46 ` Gustavo A. R. Silva
2017-06-30 20:03 ` Sergei Shtylyov
2017-06-30 20:34 ` Gustavo A. R. Silva
2017-06-30 21:08 ` [PATCH v2] " Gustavo A. R. Silva
2017-06-30 21:09 ` Sergei Shtylyov
2017-06-30 21:11 ` Gustavo A. R. Silva
2017-06-30 12:35 ` [PATCH] " Sergei Shtylyov
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=20170630052210.GA19186@embeddedgus \
--to=garsilva@embeddedor.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.