From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754970AbcISJsE (ORCPT ); Mon, 19 Sep 2016 05:48:04 -0400 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 X-IronPort-AV: E=Sophos;i="5.30,361,1470693600"; d="scan'208";a="193889060" Date: Mon, 19 Sep 2016 11:47:50 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Joel Stanley cc: kbuild-all@01.org, Jeremy Kerr , Milton Miller , Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] i2c: fix device_node_continue.cocci warnings Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: 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;