lkml.org 
[lkml]   [2014]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 01/08] PCI: rcar: check platform_get_irq() return code
From: Ben Dooks <ben.dooks@codethink.co.uk>

The current code does not check the return from platform_get_irq()
so add an error check and return if this call does fail.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Magnus Damm <damm@opensource.se>
---

drivers/pci/host/pci-rcar-gen2.c | 5 +++++
1 file changed, 5 insertions(+)

--- 0001/drivers/pci/host/pci-rcar-gen2.c
+++ work/drivers/pci/host/pci-rcar-gen2.c 2014-02-13 09:41:55.000000000 +0900
@@ -308,6 +308,11 @@ static int __init rcar_pci_probe(struct
priv->reg = reg;
priv->dev = &pdev->dev;

+ if (priv->irq < 0) {
+ dev_err(&pdev->dev, "no valid irq found\n");
+ return priv->irq;
+ }
+
return rcar_pci_add_controller(priv);
}


\
 
 \ /
  Last update: 2014-02-13 04:41    [W:0.132 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site