From patchwork Fri Dec 9 19:08:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 9468953 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 419E2607D8 for ; Fri, 9 Dec 2016 19:10:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FE0D2864E for ; Fri, 9 Dec 2016 19:10:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2148A28672; Fri, 9 Dec 2016 19:10:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B80312864E for ; Fri, 9 Dec 2016 19:10:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cFQXC-0008Ct-DN; Fri, 09 Dec 2016 19:08:42 +0000 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cFQX6-0007l0-QY for linux-arm-kernel@lists.infradead.org; Fri, 09 Dec 2016 19:08:38 +0000 X-IronPort-AV: E=Sophos;i="5.33,324,1477954800"; d="scan'208";a="203649691" Received: from 198.67.28.109.rev.sfr.net (HELO hadrien) ([109.28.67.198]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Dec 2016 20:08:06 +0100 Date: Fri, 9 Dec 2016 20:08:05 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Gregory CLEMENT Subject: [PATCH] mmc: sdhci-xenon: fix device_node_continue.cocci warnings Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161209_110837_251215_282A853C X-CRM114-Status: GOOD ( 11.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jimmy Xu , Andrew Lunn , Ulf Hansson , Hanna Hawa , Nadav Haklai , Ziji Hu , Victor Gu , Doug Jones , Jisheng Zhang , Yehuda Yitschak , "Wei\(SOCP\) Liu" , Kostya Porotchkin , Sebastian Hesselbarth , Jason Cooper , Ryan Gao , Marcin Wojtas , linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , linux-mmc@vger.kernel.org, Adrian Hunter , kbuild-all@01.org, Wilson Ding Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 CC: Hu Ziji Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- Please check on this. I have only seen the code shown below, but the rule normally has a lot false positive rate. url: https://github.com/0day-ci/linux/commits/Gregory-CLEMENT/mmc-Add-support-to-Marvell-Xenon-SD-Host-Controller/20161210-002602 base: :::::: branch date: 2 hours ago :::::: commit date: 2 hours ago Please take the patch only if it's a positive warning. Thanks! sdhci-xenon.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/mmc/host/sdhci-xenon.c +++ b/drivers/mmc/host/sdhci-xenon.c @@ -423,7 +423,6 @@ static int xenon_child_node_of_parse(str MMC_CAP2_NO_SD | MMC_CAP2_NO_SDIO; } - of_node_put(child); } return 0;