Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6266372iob; Tue, 10 May 2022 14:23:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIFldtoqXkOdcDpjiM1UayEo+NluYLloiKb9D/VTMy5vviFh2KbmMg20dnsw+YnC08qwDN X-Received: by 2002:a17:907:2d8d:b0:6f8:5c3c:7217 with SMTP id gt13-20020a1709072d8d00b006f85c3c7217mr16760068ejc.1.1652217827086; Tue, 10 May 2022 14:23:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652217827; cv=none; d=google.com; s=arc-20160816; b=FolyEsZco/IAERDJAFDr7UXYrZFgEghmNuEv+lt79xJnCTyvCSN5rDsxVheCx2Owwm QSGVJPUSDLBhYUWM09ZmEik6XnWVV+XDxayGwqfvwjFYTi+NX7CiXc34bAeiRylb8UK+ oNY4/3ESAsntYuJjKJ8MVvw6f269m7THl0nSqlJ+htIp32gCwINhKXUFuecjMmQ7sRf/ suzu/rAKxyoRt750UYYb/mdX/005axdeXTrAUMIW0hz+mpJYpF1nJ3H3QamMtTUFQrYb eKbyOHlh4vp3/qW2FiDFFyUGw8hivrMc7vJ98sUo5x/27HgD2HckYA4Ez04eVxK8ZyK/ qtww== 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=EECdWlQp/ZD6DngeWO/wK+PoDQfmQIy/5WsTi/oCdwk=; b=01cqBj2HYoASuzrxcWWVgotBjdyV5DcIvfBb+n3YEkg5L9CRDqF5c1of/9jVWJMHt7 bQPiBQbn7j5IIie44aq9NRiX5hLdnExFWAMePTKbGfY+7+b0wIakI+4FJBEGEulreCPT 1rP4zSM0tNpwGDM2t82TL5Ww+JPaXKFNojEyGSqmRS5D8lNw27/8MxWtbh9O32xONSsC aHO9pa0PQZWU2qOXrVaqKWtrSpdwhNN4kMDPM9HXjN0DQiNrV7i27SHzmPvrwS9/u0qm /6gcY8t2ddKyThGKobQk76uXhWhJxMkpBCpSIjR5gALNZpIqDlbJ3YdZfqRCnWAdVVdu 5JPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sa5V4oN6; 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 u8-20020aa7db88000000b00418c2b5bdecsi231614edt.206.2022.05.10.14.23.23; Tue, 10 May 2022 14:23:47 -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=sa5V4oN6; 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 S244682AbiEJN4O (ORCPT + 99 others); Tue, 10 May 2022 09:56:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244967AbiEJNiS (ORCPT ); Tue, 10 May 2022 09:38:18 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0965F7890D; Tue, 10 May 2022 06:26:45 -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 ams.source.kernel.org (Postfix) with ESMTPS id BF2E6B81DA0; Tue, 10 May 2022 13:26:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D598C385A6; Tue, 10 May 2022 13:26:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652189202; bh=P3SVQNOO3B7N/QZLCcWPzgOahP2/LyoDyJ/f3OPaNKs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sa5V4oN6bXEMzn+MX1/7DxbY+Ssj85yLVDeozjtehHvq9LeVipm1IPKZ3a4uBJE1j rymVLY5ycOji505yYlJ22uQloEoHfDvJ0w37wVpUK3E9EU7iWFsnbbVMcGgZYl4TYG 0ltB4CxBdXXLHy9FXh38ThtmI6wRTahhgueFxGk8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yang Yingliang , Jakub Kicinski Subject: [PATCH 5.10 45/70] net: ethernet: mediatek: add missing of_node_put() in mtk_sgmii_init() Date: Tue, 10 May 2022 15:08:04 +0200 Message-Id: <20220510130734.180217074@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 ff5265d45345d01fefc98fcb9ae891b59633c919 upstream. The node pointer returned by of_parse_phandle() with refcount incremented, so add of_node_put() after using it in mtk_sgmii_init(). Fixes: 9ffee4a8276c ("net: ethernet: mediatek: Extend SGMII related functions") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20220428062543.64883-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mediatek/mtk_sgmii.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/mediatek/mtk_sgmii.c +++ b/drivers/net/ethernet/mediatek/mtk_sgmii.c @@ -26,6 +26,7 @@ int mtk_sgmii_init(struct mtk_sgmii *ss, break; ss->regmap[i] = syscon_node_to_regmap(np); + of_node_put(np); if (IS_ERR(ss->regmap[i])) return PTR_ERR(ss->regmap[i]); }