提交 3ef9cc31 编写于 作者: F Fabio Estevam 提交者: Tejun Heo

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: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 b314fc77
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册