[PATCH] i2c: fix device_node_continue.cocci warnings

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

 



 Device node iterators put the previous value of the index variable, so an
 explicit put causes a double put.

Generated by: scripts/coccinelle/iterators/device_node_continue.cocci

Signed-off-by: Julia Lawall <julia.lawall@xxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---

Please take the patch only if it's a positive warning. Thanks!

I haven't checked anything more that what is shown in the patch.

julia

 i2c-aspeed.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -862,7 +862,6 @@ static int ast_i2c_probe_controller(stru
 			continue;

 		of_platform_device_create(np, bus_id, &pdev->dev);
-		of_node_put(np);
 	}

 	return 0;
--
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