Skip to contentSkip to conversation

i2c-pnx: fix error return code in i2c_pnx_probe()

PATCH Applied Wei Yongjun 3 participants 3 messages Aug 23, 2013 – Aug 28, 2013 1 message not in the archive

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

PATCH 1/1 i2c-pnx: fix error return code in i2c_pnx_probe()

From: Wei Yongjun <[email protected]>

Fix to return a negative error code in the irq get error handling case instead of 0, as done elsewhere in this function.

---
 drivers/i2c/busses/i2c-pnx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-pnx.c +1 -0
index 5f39c6d..d2f02b3 100644
@@ -727,6 +727,7 @@ static int i2c_pnx_probe(struct platform_device *pdev)
 	alg_data->irq = platform_get_irq(pdev, 0);
 	if (alg_data->irq < 0) {
 		dev_err(&pdev->dev, "Failed to get IRQ from platform resource\n");
+		ret = alg_data->irq;
 		goto out_irq;
 	}
 	ret = request_irq(alg_data->irq, i2c_pnx_interrupt,

A message that is not in the archive (sent off-list or not yet received): CAPgLHd9W5GtFtt6yCHRJ2mmuy2ha2u_utF9jR3yLY5O_oYpLWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#3 lore raw

PATCH 1/1 i2c-pnx: fix error return code in i2c_pnx_probe()

In reply to Wei Yongjun
Quoted 6 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Fix to return a negative error code in the irq get error handling case instead of 0, as done elsewhere in this function.

Moved it to for-next, since...

Quoted 9 lines
---
 drivers/i2c/busses/i2c-pnx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-pnx.c +0 -0
index 5f39c6d..d2f02b3 100644

drivers/i2c/busses/i2c-pnx.c static int i2c_pnx_probe(struct platform_device *pdev) · line 731

Quoted 5 lines
drivers/i2c/busses/i2c-pnx.c +1 -0
@@ -727,6 +727,7 @@ static int i2c_pnx_probe(struct platform_device *pdev)
 	alg_data->irq = platform_get_irq(pdev, 0);
 	if (alg_data->irq < 0) {
 		dev_err(&pdev->dev, "Failed to get IRQ from platform resource\n");
+		ret = alg_data->irq;
 		goto out_irq;

... this surely needs to beu 'out_clock'. Fixed it here. If somebody wants to convert it to devm_*, much appreciated.

drivers/i2c/busses/i2c-pnx.c static int i2c_pnx_probe(struct platform_device *pdev) · line 733

Quoted 3 lines
drivers/i2c/busses/i2c-pnx.c +0 -0
 	}
 	ret = request_irq(alg_data->irq, i2c_pnx_interrupt,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130828/4c2f106b/attachment.sig>