[PATCH] i2c: sun6-p2wi: fix erroneous error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The variable containing the return value of platform_get_irq is irq not
ret, this means the error code printed in the error message will be false.

Signed-off-by: Boris BREZILLON <boris.brezillon@xxxxxxxxxxxxxxxxxx>
Reported-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---

Hello Wolfram,

This patch fixes a bug reported by Fengguang's build robot.

I know you've already applied my series to your for-next tree, but let me
know if you want me to squash this patch into the P2WI series and send a v8.

Best Regards,

Boris

 drivers/i2c/busses/i2c-sun6i-p2wi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-sun6i-p2wi.c b/drivers/i2c/busses/i2c-sun6i-p2wi.c
index f1d3e6f..5d2d678 100644
--- a/drivers/i2c/busses/i2c-sun6i-p2wi.c
+++ b/drivers/i2c/busses/i2c-sun6i-p2wi.c
@@ -240,7 +240,7 @@ static int p2wi_probe(struct platform_device *pdev)
 	snprintf(p2wi->adapter.name, sizeof(p2wi->adapter.name), pdev->name);
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		dev_err(dev, "failed to retrieve irq: %d\n", ret);
+		dev_err(dev, "failed to retrieve irq: %d\n", irq);
 		return irq;
 	}
 
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux