diff mbox

sata_highbank: fix error return code in ahci_highbank_probe()

Message ID 20170630050306.GA17486@embeddedgus
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Gustavo A. R. Silva June 30, 2017, 5:03 a.m. UTC
Propagate the return value of platform_get_irq on failure.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/ata/sata_highbank.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Sergei Shtylyov June 30, 2017, 9:21 p.m. UTC | #1
On 06/30/2017 08:03 AM, Gustavo A. R. Silva wrote:

> Propagate the return value of platform_get_irq on failure.

    Needs the same explanations as the sata_rcar patch.

> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Gustavo A. R. Silva June 30, 2017, 9:24 p.m. UTC | #2
Quoting Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>:

> On 06/30/2017 08:03 AM, Gustavo A. R. Silva wrote:
>
>> Propagate the return value of platform_get_irq on failure.
>
>    Needs the same explanations as the sata_rcar patch.
>

Yep, I already sent v2 a minute ago.

Thanks!
--
Gustavo A. R. Silva





--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
index aafb8cc..2fc451c 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) {
+	if (irq < 0) {
 		dev_err(dev, "no irq\n");
-		return -EINVAL;
+		return irq;
 	}
 
 	hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);