Received: by 10.192.165.156 with SMTP id m28csp1142977imm; Wed, 11 Apr 2018 13:14:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx4968XeW+viOM3nJC4Lc9gyky/7cwuOd/mEATIX/ZPv8TcEv8JY0wCeZSnB9b3WJS+0ZLSHk X-Received: by 10.98.32.134 with SMTP id m6mr5224702pfj.27.1523477655713; Wed, 11 Apr 2018 13:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523477655; cv=none; d=google.com; s=arc-20160816; b=KIXM7VOBc7jPxKyw26PKoTZ1/F5GoRRsReNulmADjRBrfG7cVC0Mb+1uaIBLDdTuPz 84GxvXtObuF5TxD4DCUDNLJpiP6yWdd5RWhqqMQTDBq1iMeaG1FZNVd2i4Ip9+kzkwbV otj/DIktS8skyWVZJrSSc6Y5J7HFRZfPsBKFjjFcgPZP66i4qmvMqDF1B0Q52/n8D2v1 8eAO6PzG60DBT5hFzdgG6tqBmOo5Uoqb/Zdfca1EqJvRoTHB2J3gUxEuNLQPYuorWkjJ CIoesQM/U8ToqmJglaz7sDk5bB1So04f38KIDKyfJH00H+dFEXa3dEE5Me4OKhojkPDA 5hTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=3vtKa3oKw8PmjkK4RX+Aya0u4FcEfMFEMVzOjSzfPhg=; b=q3btd3VgbycvUxuQDsZdCOdTjqx6IwMkA9S8lUURTeyyTZQwx3U4KSnsEThIx3nxSl mcDxA58gdEKd7BEqBLhbIVUM0ArZZDOFGcgpsgVW3892fivlavFH5RgfSjQGxZN6sPDt 29NFLrhmn3m9LHkHmC+ISb+Wqb9TnBOWMCBJXjafm1n3qmUNoLHutvNB4q67En61Ayjv WfVWeEu0mvF5BYghEa04IY/7HL8yP6f12A4U31Um0RMG3tr0cAWSMAdz4y+H2idFclvk L3pXfgofmUNhmTXszvEeVSD3MLtSp1nGqzWTKH1X+bbIF6vmEHXSLESOaQX6wxzQw+NW YT9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si1370908pfn.89.2018.04.11.13.13.38; Wed, 11 Apr 2018 13:14:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757411AbeDKUIu (ORCPT + 99 others); Wed, 11 Apr 2018 16:08:50 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34688 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932754AbeDKSyr (ORCPT ); Wed, 11 Apr 2018 14:54:47 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6BFD099F; Wed, 11 Apr 2018 18:54:46 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jon Mason , Julia Lawall , Fengguang Wu , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 052/310] mdio: mux: fix device_node_continue.cocci warnings Date: Wed, 11 Apr 2018 20:33:11 +0200 Message-Id: <20180411183624.486848927@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180411183622.305902791@linuxfoundation.org> References: <20180411183622.305902791@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Julia Lawall [ Upstream commit 8c977f5a856a7276450ddf3a7b57b4a8815b63f9 ] Device node iterators put the previous value of the index variable, so an explicit put causes a double put. In particular, of_mdiobus_register can fail before doing anything interesting, so one could view it as a no-op from the reference count point of view. Generated by: scripts/coccinelle/iterators/device_node_continue.cocci CC: Jon Mason Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/phy/mdio-mux.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/net/phy/mdio-mux.c +++ b/drivers/net/phy/mdio-mux.c @@ -169,7 +169,6 @@ int mdio_mux_init(struct device *dev, if (r) { mdiobus_free(cb->mii_bus); devm_kfree(dev, cb); - of_node_put(child_bus_node); } else { cb->next = pb->children; pb->children = cb;