summaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_imx.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-02-17 23:05:57 +0100
committerTejun Heo <tj@kernel.org>2014-02-18 23:39:54 +0100
commit3ef9cc31ee39dea369e989de3f7f9e822cc8de62 (patch)
tree6891bfa6604da1c29d7639546e3e028da8b40185 /drivers/ata/pata_imx.c
parentpata_imx: Use devm_ioremap_resource() to simplify code (diff)
downloadlinux-3ef9cc31ee39dea369e989de3f7f9e822cc8de62.tar.xz
linux-3ef9cc31ee39dea369e989de3f7f9e822cc8de62.zip
pata_imx: Propagate the real error code on platform_get_irq() failure
No need to return a 'fake' return value on platform_get_irq() failure. Just return the error code itself instead. Also, change the error condition to irq < 0, so that only negative values are treated as errors. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/pata_imx.c')
-rw-r--r--drivers/ata/pata_imx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
index 50e2cf29721e..121c748314c3 100644
--- a/drivers/ata/pata_imx.c
+++ b/drivers/ata/pata_imx.c
@@ -100,8 +100,8 @@ static int pata_imx_probe(struct platform_device *pdev)
int ret;
irq = platform_get_irq(pdev, 0);
- if (irq <= 0)
- return -EINVAL;
+ if (irq < 0)
+ return irq;
priv = devm_kzalloc(&pdev->dev,
sizeof(struct pata_imx_priv), GFP_KERNEL);