Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1678490
| From | "Gustavo A. R. Silva" <garsilva@embeddedor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] sata_rcar: fix error return code in sata_rcar_probe() |
| Date | 2017-06-30 07:50 +0200 |
| Message-ID | <tXWYy-1lt-9@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] sata_rcar: fix error return code in sata_rcar_probe() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-30 07:50 +0200
Re: [PATCH] sata_rcar: fix error return code in sata_rcar_probe() Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2017-06-30 11:50 +0200
Re: [PATCH] sata_rcar: fix error return code in sata_rcar_probe() Tejun Heo <tj@kernel.org> - 2017-06-30 14:10 +0200
Re: [PATCH] sata_rcar: fix error return code in sata_rcar_probe() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-30 21:40 +0200
Re: [PATCH] sata_rcar: fix error return code in sata_rcar_probe() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-30 21:50 +0200
Re: [PATCH] sata_rcar: fix error return code in sata_rcar_probe() Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2017-06-30 22:10 +0200
Re: [PATCH] sata_rcar: fix error return code in sata_rcar_probe() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-30 22:40 +0200
[PATCH v2] sata_rcar: fix error return code in sata_rcar_probe() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-30 23:10 +0200
Re: [PATCH] sata_rcar: fix error return code in sata_rcar_probe() Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2017-06-30 21:50 +0200
Re: [PATCH] sata_rcar: fix error return code in sata_rcar_probe() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-30 22:00 +0200
Re: [PATCH] sata_rcar: fix error return code in sata_rcar_probe() Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2017-06-30 14:40 +0200
csiph-web