Browse Source

spi: spi-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.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Fabio Estevam 11 năm trước cách đây
mục cha
commit
82106e0e39
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/spi/spi-imx.c

+ 1 - 1
drivers/spi/spi-imx.c

@@ -880,7 +880,7 @@ static int spi_imx_probe(struct platform_device *pdev)
 
 	spi_imx->irq = platform_get_irq(pdev, 0);
 	if (spi_imx->irq < 0) {
-		ret = -EINVAL;
+		ret = spi_imx->irq;
 		goto out_master_put;
 	}