From patchwork Mon Sep 19 09:47:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 671647 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3sd1K94SyDz9s1h for ; Mon, 19 Sep 2016 19:47:57 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752769AbcISJrz (ORCPT ); Mon, 19 Sep 2016 05:47:55 -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" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Sep 2016 11:47:52 +0200 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 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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;