From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia Lawall Subject: [PATCH] i2c: fix device_node_continue.cocci warnings Date: Mon, 19 Sep 2016 11:47:50 +0200 (CEST) Message-ID: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:6945 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752090AbcISJrz (ORCPT ); Mon, 19 Sep 2016 05:47:55 -0400 Sender: linux-i2c-owner@vger.kernel.org List-Id: linux-i2c@vger.kernel.org To: Joel Stanley Cc: kbuild-all@01.org, Jeremy Kerr , Milton Miller , Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org 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 Signed-off-by: Fengguang Wu --- 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;