Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1958035imn; Mon, 1 Aug 2022 06:18:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tzneOc5ApYBrU5UxPYF1lUgFta4Q6uhgdo7TN9Y3Bl07tM2j9mhHul2qtetfEcrDgBcj74 X-Received: by 2002:a05:6870:6086:b0:10b:8905:14c3 with SMTP id t6-20020a056870608600b0010b890514c3mr7422106oae.255.1659359909667; Mon, 01 Aug 2022 06:18:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659359909; cv=none; d=google.com; s=arc-20160816; b=vIIEW/poFs0x9Fbd6mDlmjIjSQdTXIMKpyuQhQTrlyFbFu6BI4gZL/kz0UMEyRdszZ /AtrHSip9Trp5hLhWxyV85eEkwtbZOEA9V7ehIWfeL9bPmwpXrzWCWI0wPBkGBtYy9Ap 5H/3AWxIVR+aRRTDrzsAbghz6ZNaVRWWJ5lS2jhF6pT6UXGGbIDabGPFIux9uNPsriqh r5WtskE8Ow/Y2LlFBWTI0djZGy0m02Q5dbaZtzI7K+BOTUOihFUTzGovWdXUFPkDmwYe H0uetX2UZeR5vutTx6LaIeQGNHrdsk/CUFGljb3qYTPyFonhMcDCp/9JNR+RDe1Erjqx k9sA== 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=eu42gWu2YpTEreRDDyTJEfFKY8rUq59oip6iWEBZui4=; b=cuys+iOrxQ7Gw1tmqvxJaeoIsLyzacQm2nCSEtA15jVFaAgrd27EVxS57uupWndonC yv0oL+rA93gKpUaxIaHgJAl4LQVOX+R3ES3A9ZhyrjE2c0GXLqSDhM6YEXPVvLK7ASd7 6kfFIG07fjd4Pv7mmbe0ix1LeaLd4dtWJEFhrUDUqYmcjhxu20yUcvHaDzRw5zAqLazx LmLW62TQZMe0qGaKtIZ1Yl1AsZE9eeQl25hPuItH9oF9R8L4gLrdofK8yX+fa5I/O93j koyUJatKuGxLABGLmI6m+5RhYKBRv4YtWnvgd6X4mqC+av5UlUD1eXMFY1g5gZ9+2H44 eu2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IiE6bdjf; 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 fq19-20020a0568710b1300b0010dc8a1838esi6867472oab.18.2022.08.01.06.17.52; Mon, 01 Aug 2022 06:18:29 -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=IiE6bdjf; 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 S232158AbiHALyL (ORCPT + 99 others); Mon, 1 Aug 2022 07:54:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231916AbiHALx0 (ORCPT ); Mon, 1 Aug 2022 07:53:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8499BBCB4; Mon, 1 Aug 2022 04:50:20 -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 ABA26612DF; Mon, 1 Aug 2022 11:50:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B21F9C433C1; Mon, 1 Aug 2022 11:50:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1659354619; bh=Z2nPSpHn1y5163xrsf+ZmDTgWIF3XTh49tZw0iUcB1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IiE6bdjfHrTQbCgbLvvI0JZtY7lQr+k/AdYYhAZK8hjJL7CEIYmTTW2BLtosK0WXA rYm12yMO80m45WeGN3DCoje2Gn50aphUTgoLEGX88lW7qlTAzUum/HlPEWDFoRKK99 yOlTNdDAOo/JmIrkIBw7NxcFQ+zfR5hWqoQ+vtyY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Liang He , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 25/65] net: sungem_phy: Add of_node_put() for reference returned by of_get_parent() Date: Mon, 1 Aug 2022 13:46:42 +0200 Message-Id: <20220801114134.753601925@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220801114133.641770326@linuxfoundation.org> References: <20220801114133.641770326@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 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: Liang He [ Upstream commit ebbbe23fdf6070e31509638df3321688358cc211 ] In bcm5421_init(), we should call of_node_put() for the reference returned by of_get_parent() which has increased the refcount. Fixes: 3c326fe9cb7a ("[PATCH] ppc64: Add new PHY to sungem") Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220720131003.1287426-1-windhl@126.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/sungem_phy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c index 291fa449993f..45f295403cb5 100644 --- a/drivers/net/sungem_phy.c +++ b/drivers/net/sungem_phy.c @@ -454,6 +454,7 @@ static int bcm5421_init(struct mii_phy* phy) int can_low_power = 1; if (np == NULL || of_get_property(np, "no-autolowpower", NULL)) can_low_power = 0; + of_node_put(np); if (can_low_power) { /* Enable automatic low-power */ sungem_phy_write(phy, 0x1c, 0x9002); -- 2.35.1