Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1115973rwi; Wed, 19 Oct 2022 06:58:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6JUn67RbfvjTqRs6CtQ4KhwOZoUyrT39VPx69CyOXBj4v6rwIhGgzzp5t0FLn8SLM52zAA X-Received: by 2002:a05:6402:350f:b0:45d:1d86:9ec9 with SMTP id b15-20020a056402350f00b0045d1d869ec9mr7748421edd.266.1666187880446; Wed, 19 Oct 2022 06:58:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666187880; cv=none; d=google.com; s=arc-20160816; b=U/c2XD9JlY0kx8q9H0hr+FZb0wa5pPhpwOCAdZNCFS5n5NS1Oo2MzlnnchdhgTaKAK Ds5uqdYsWNK4jCAO/odGxP8PbiJA8qYYWZQUMQnoFZBY2tw6mBNHTl4t2CHgxp+mVn0Q 2/N5IU9Q+U2CmMqEVt4fq/KE2WANd/35a5vou5mthiR4b7gsvgyuZHdVWaO9YWmeQ+mt LNAiSpkUGl4NVffNcgnwDHLPqFYB1QtKMjUFRZ2AB+rV58zTPEG1syP/kPsR/VU68SKU X0k5vbNDFBnp3vlQ8dZepcyXH0z4AaPabBG9qba+Mdp+yrdNC/jHWUE1lUo0UMSLfiHZ tk5A== 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=1GMx6OuFidB3j1RSaOH1gvLOJiKUKowCpwylL/pAduQ=; b=Pc8WGd+GVorbIbwltJhfFLw7lZ315KJIzaN3YErBcsTJSSR2wy7naXgOXgVyPVnRjA oy/92vEnlJd9+8R+6xkeW9fQzezjQ4xoIipYKX3HYSKNdkkoAlCIGuZEz5CmzAw3xF9s xtMcNO11/Wbhb1OhiQB06FKX+Td0/NJuBEGbsiMxx4u67x389VEXOrqZfrSizPeT5XCx 2SRBx21uS75eDXbSjCFVCALE5lJBtrRz1HUF3GIRUObTNppVQsn4c+E12FCSxQBk7FSQ BrAAw5uYiB/v+BvY4BwtxlqydViOPeQU/a7zLlD1nhVTQAfakwMoK7G6Xml/G8Zz2t2R Mp6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="kp/o175m"; 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 dr14-20020a170907720e00b00770880dff50si13774406ejc.586.2022.10.19.06.57.35; Wed, 19 Oct 2022 06:58:00 -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="kp/o175m"; 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 S233477AbiJSNrK (ORCPT + 99 others); Wed, 19 Oct 2022 09:47:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233251AbiJSNqF (ORCPT ); Wed, 19 Oct 2022 09:46:05 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2112A12FF98; Wed, 19 Oct 2022 06:32:07 -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 sin.source.kernel.org (Postfix) with ESMTPS id 63A77CE2173; Wed, 19 Oct 2022 09:05:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69B73C43470; Wed, 19 Oct 2022 09:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170319; bh=MzqN5J3LzkgF+sMfK6atxZHurz4IuMxAyc9YhNaRH90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kp/o175mQ3a1t0UAuuUgZZkHlr9IjmwQslCc+5Pe0elQArsIGRJrGkZFsC4p3x7tL cblJBw+XL4/fZevNg8annbjCc+qq7rOgcmBMLVhZcrWbHLbn7grEVtIfSiLtH41tc8 m6weL3uB6erqdMX2P+2IiYq7x6UV41Qn5wkKXNgc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zheng Yongjun , Michael Ellerman , Sasha Levin Subject: [PATCH 6.0 611/862] powerpc/powernv: add missing of_node_put() in opal_export_attrs() Date: Wed, 19 Oct 2022 10:31:38 +0200 Message-Id: <20221019083316.921392634@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 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: Zheng Yongjun [ Upstream commit 71a92e99c47900cc164620948b3863382cec4f1a ] After using 'np' returned by of_find_node_by_path(), of_node_put() need be called to decrease the refcount. Fixes: 11fe909d2362 ("powerpc/powernv: Add OPAL exports attributes to sysfs") Signed-off-by: Zheng Yongjun Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220906141703.118192-1-zhengyongjun3@huawei.com Signed-off-by: Sasha Levin --- arch/powerpc/platforms/powernv/opal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index 55a8fbfdb5b2..3510b55b36f8 100644 --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c @@ -892,6 +892,7 @@ static void opal_export_attrs(void) kobj = kobject_create_and_add("exports", opal_kobj); if (!kobj) { pr_warn("kobject_create_and_add() of exports failed\n"); + of_node_put(np); return; } -- 2.35.1