Skip to contentSkip to conversation

i2c: fix device_node_continue.cocci warnings

PATCH New Julia Lawall 1 participant 1 message Sep 19, 2016

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

PATCH 1/1 i2c: fix device_node_continue.cocci warnings

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

---

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(-)
drivers/i2c/busses/i2c-aspeed.c +0 -1
@@ -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;