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 v2] sata_highbank: fix error return code in ahci_highbank_probe()
Date: Fri, 30 Jun 2017 16:20:38 -0500 [thread overview]
Message-ID: <20170630212038.GA10222@embeddedgus> (raw)
In-Reply-To: <20170630050306.GA17486@embeddedgus>
platform_get_irq() returns an error code, but the sata_highbank
driver ignores it and always returns -EINVAL. This is not correct,
and prevents -EPROBE_DEFER from being propagated properly.
Also, notice that platform_get_irq() no longer returns 0 on error.
Print error message and propagate the return value of platform_get_irq
on failure.
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
Changes in v2:
Rewrite commit message.
drivers/ata/sata_highbank.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
index aafb8cc..1419cf9 100644
--- a/drivers/ata/sata_highbank.c
+++ b/drivers/ata/sata_highbank.c
@@ -483,9 +483,9 @@ static int ahci_highbank_probe(struct platform_device *pdev)
}
irq = platform_get_irq(pdev, 0);
- if (irq <= 0) {
- dev_err(dev, "no irq\n");
- return -EINVAL;
+ if (irq < 0) {
+ dev_err(dev, "failed to get IRQ: %d\n", irq);
+ return irq;
}
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
--
2.5.0
next prev parent reply other threads:[~2017-06-30 21:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-30 5:03 [PATCH] sata_highbank: fix error return code in ahci_highbank_probe() Gustavo A. R. Silva
2017-06-30 21:20 ` Gustavo A. R. Silva [this message]
2017-06-30 21:21 ` Sergei Shtylyov
2017-06-30 21:24 ` Gustavo A. R. Silva
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=20170630212038.GA10222@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox