Skip to contentSkip to conversation

spi: spi-mxs: Propagate the real error code on platform_get_irq() failure

PATCH Applied Fabio Estevam 3 participants 6 messages Feb 14, 2014 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 spi: spi-mxs: Propagate the real error code on platform_get_irq() failure

From: Fabio Estevam <[email protected]>

No need to return a 'fake' return value on platform_get_irq() failure.

Just return the error code itself instead.

---
 drivers/spi/spi-mxs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-mxs.c +1 -1
index 4208f24..2884f0c 100644
@@ -472,7 +472,7 @@ static int mxs_spi_probe(struct platform_device *pdev)
 	iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	irq_err = platform_get_irq(pdev, 0);
 	if (irq_err < 0)
-		return -EINVAL;
+		return irq_err;
 
 	base = devm_ioremap_resource(&pdev->dev, iores);
 	if (IS_ERR(base))
Signature · 6 lines
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1392347962-9835-1-git-send-email-festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH 2/2 spi: spi-imx: Propagate the real error code on platform_get_irq() failure

From: Fabio Estevam <[email protected]>

No need to return a 'fake' return value on platform_get_irq() failure.

Just return the error code itself instead.

---
 drivers/spi/spi-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-imx.c +1 -1
index 2ccfde6..3577939 100644
@@ -879,7 +879,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;
 	}
 
Signature · 6 lines
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1392347962-9835-2-git-send-email-festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Acked-by
#4 lore raw

Re: [PATCH 2/2] spi: spi-imx: Propagate the real error code on platform_get_irq() failure

Quoted 7 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

No need to return a 'fake' return value on platform_get_irq() failure.

Just return the error code itself instead.

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Acked-by
#6 lore raw
In reply to a message not in the archive
Quoted 7 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

No need to return a 'fake' return value on platform_get_irq() failure.

Just return the error code itself instead.

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html