Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6062132iob; Tue, 10 May 2022 09:28:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRg3WRG7Vu5roKSgfJs6ZtEtCdRm7shcOqN+E7lM7lM12z1hHPs95BiGDpzBaLpELlwvA/ X-Received: by 2002:a17:90b:33ce:b0:1dc:690e:acef with SMTP id lk14-20020a17090b33ce00b001dc690eacefmr726768pjb.121.1652200118771; Tue, 10 May 2022 09:28:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652200118; cv=none; d=google.com; s=arc-20160816; b=QnlHTR4tFMbBaadPoFXy94yHEzmFKy59Gm9M7KOyQUXs+t0SYpNSMhulPTtqzt0dEE Bt1ZFe+vbgJvzp35ZTlT3bAeJdrnbHXF5H+FtSflbKZFSKka+1pjguC6DTj6pdKY5v8D NV6DSQPjHRV+01w9WPKK6YaG2EuB18pew6bog21u/6gZ2jc9ZxecWs/T+eYWlldEoVaw GwyvQog0fVSwIeaG7B2gupPuySwJTHL4p0YHa5Uyk1BdOTYWgrz4z0HECSbOL0Qtd4uE Bx7rdRdNU1mcOy8WrBVOAgtd5oc1anxl37jowaBboMjgYe2ZyYBjrYFWLskgkDtBKGgN HYqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=K1wbW56ItEZLdBqpsMBYOg1Ontk0QJtdjy/Qg04+MoA=; b=J8dpJENffjpEXmRAvMLaiw+b71yT03mMqW29iH5fMuBFUgcyjHQZoFAugcZoEq7aH9 3gzo1woHAtALvk6QPfeDtBrz9GjHY2ogw0F9S9IJh5pH/bvtvOdcx+BvPoPD5d42lvK9 OsTEoub6BYlaqsjjdZv8EMATKXGVfeuHdA5iCYMDvE0mpRi/cgCZJJ59VEVW6cgrlE+K Ahe0X1zhwGwyTf8Hv5xVyG7pWyQf+Znj4SUVtftTwOqadsVeKpNCWJbFeiL6ZVvO1C6o knRSK6n9nOSCI/cYgfCkRNXzaXBYYgCakYmF1KlfA5MU9yLnYz3ldEk4yU83SepLzO5q jr2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rYk+RlMy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e6-20020a170902ef4600b0015cfe719880si3518925plx.292.2022.05.10.09.28.21; Tue, 10 May 2022 09:28:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rYk+RlMy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244716AbiEJN4U (ORCPT + 99 others); Tue, 10 May 2022 09:56:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244961AbiEJNiR (ORCPT ); Tue, 10 May 2022 09:38:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A493878929; Tue, 10 May 2022 06:26:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 387E46170D; Tue, 10 May 2022 13:26:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48F47C385C2; Tue, 10 May 2022 13:26:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652189205; bh=Y25/R4Z9zWRfq6oQO6x6b8SBv9CRfRZbAbHgBjQAO2c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rYk+RlMyBOiPEGDl11TARMb1LeUvK9FCmuIMw8ZPrVO/1hd4RAs8C+BqbTtHtWBXi kvTAoKEtSpHQ9G3jRP2TnSSjj2hP5jtm2rW5KKcsHF4olU9gp2CATTve4pr5/5uwhc zaQDsMOqbltol8IuHk4M46ivuc8kxsygvvRbCf04= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Yang Yingliang , Jakub Kicinski Subject: [PATCH 5.10 46/70] net: dsa: mt7530: add missing of_node_put() in mt7530_setup() Date: Tue, 10 May 2022 15:08:05 +0200 Message-Id: <20220510130734.207506860@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130732.861729621@linuxfoundation.org> References: <20220510130732.861729621@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yang Yingliang commit a9e9b091a1c14ecd8bd9d3214a62142a1786fe30 upstream. Add of_node_put() if of_get_phy_mode() fails in mt7530_setup() Fixes: 0c65b2b90d13 ("net: of_get_phy_mode: Change API to solve int/unit warnings") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220428095317.538829-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/mt7530.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -1663,6 +1663,7 @@ mt7530_setup(struct dsa_switch *ds) ret = of_get_phy_mode(mac_np, &interface); if (ret && ret != -ENODEV) { of_node_put(mac_np); + of_node_put(phy_node); return ret; } id = of_mdio_parse_addr(ds->dev, phy_node);