Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1679139
| From | "Gustavo A. R. Silva" <garsilva@embeddedor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2] sata_highbank: fix error return code in ahci_highbank_probe() |
| Date | 2017-06-30 23:30 +0200 |
| Message-ID | <tYbEe-2ed-19@gated-at.bofh.it> (permalink) |
| References | <tXWlQ-15N-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] sata_highbank: fix error return code in ahci_highbank_probe() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-30 07:10 +0200 Re: [PATCH] sata_highbank: fix error return code in ahci_highbank_probe() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-30 23:30 +0200 Re: [PATCH] sata_highbank: fix error return code in ahci_highbank_probe() Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2017-06-30 23:30 +0200 [PATCH v2] sata_highbank: fix error return code in ahci_highbank_probe() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-30 23:30 +0200
csiph-web