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: 9468949 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 37427607D8 for ; Fri, 9 Dec 2016 19:08:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 287F92864E for ; Fri, 9 Dec 2016 19:08:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D0312865D; Fri, 9 Dec 2016 19:08:18 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 043A128672 for ; Fri, 9 Dec 2016 19:08:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932232AbcLITIM (ORCPT ); Fri, 9 Dec 2016 14:08:12 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:31924 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932197AbcLITIK (ORCPT ); Fri, 9 Dec 2016 14:08:10 -0500 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 cc: Ulf Hansson , Adrian Hunter , linux-mmc@vger.kernel.org, Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, Ziji Hu , Jimmy Xu , Jisheng Zhang , Nadav Haklai , Ryan Gao , Doug Jones , Victor Gu , "Wei(SOCP) Liu" , Wilson Ding , Yehuda Yitschak , Marcin Wojtas , Hanna Hawa , Kostya Porotchkin , kbuild-all@01.org 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 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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;