Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2209393iof; Tue, 7 Jun 2022 23:16:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMkPUnA3z/KZRSHtNwVPQOSvmCxxgGdK7UkEM/KCfvR53Kz2hXv7pkEqPdLuVWSIvx8T7+ X-Received: by 2002:a17:902:8689:b0:14e:f1a4:d894 with SMTP id g9-20020a170902868900b0014ef1a4d894mr19335691plo.65.1654669001010; Tue, 07 Jun 2022 23:16:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654669001; cv=none; d=google.com; s=arc-20160816; b=ukfUDN6+uPTefHNxYiZ9/TpmYOpG9X2PID9oaQ+Mmqn/ihNvN14r6QtLkyAtZmJhYK iSIUKtRzgJecuQ8D928hbW8aqCX3ozw6iqkTXU7v96xc5JJWBx1cdKUSA7SB7Ixn6m0s eKrnr8zI07pkAhfIk3k6ZTYYCKTGWBUYSTWvyG0+RkiAicRfXOz1Ctrpn1ETtWprf5DX SRT5bx6QSvyNN2hQgda/cRVGkY+9jP5dZ7O+IMDkrXU52g5LRdekbVxbkM1HhB2RCPa2 9pGkeVfRo4wSwOkBBdH0mVTV6JPtSW/q7tggQBrWcPZnQbnVuoZRITRKbn5QB+ACT5po Fo9Q== 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=wFnpknnyRfHBoTNfdD+RGBOMu9f/VSOFB7nLhAKurGc=; b=eLClRmXNu3pKEQkOEOW/vM4zpWQio0owqx2DIUbElXQG8QcGHm9BbthRof5mJTeQCn wR429dZp56HpHDy1IRbLow3TPIa7rX0ooQNMxJfCWo85YB2iPP4DouYz0af+UE8y0CkZ wFjMg0NWBCmIVX/FQ5Fhoio/2ZvpxOIFXNbWhaZE1AG4A1MUEJWiofifSoM++A7/WySK A9KKvqEFeaWZEJ08oWO19kj5GaijWhzqo8oBjXilhenYIsY9fmOCmPcTh5jh1KDnss8m 3ezGJX9BscmXUAVhTYhQkh/SBTEQmCoq3kdu2XOiizxwlyekRH6u8xtZrDEa6C2X4H4l N29w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VPf4ouNm; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s20-20020a056a0008d400b0050d51c28264si29457027pfu.68.2022.06.07.23.16.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 23:16:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VPf4ouNm; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A29DC2FC0F3; Tue, 7 Jun 2022 22:37:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233522AbiFHBsB (ORCPT + 99 others); Tue, 7 Jun 2022 21:48:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383072AbiFGVwQ (ORCPT ); Tue, 7 Jun 2022 17:52:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CB442408FC; Tue, 7 Jun 2022 12:10:26 -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 18CDF617DA; Tue, 7 Jun 2022 19:10:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2757DC34115; Tue, 7 Jun 2022 19:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629025; bh=4JIrRICiYrnw1c2ygg9e+MEN7EFrlrJShWuE87GFz/4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VPf4ouNmZs6EbT8etkn2uKPmn7ASyP1HLH12et8rXhJj8CrL9j77uEbNxbgTrLDDx jfv+/C/IVj2WU7aOpXQvDb+k6NjU7/YR7Vzt1Tayd+n0W2Hc6vpifKwaB6UpKgdT0P LMY9dnqqDJ4GPNr9U/vQXT7qRjgUxtqt/U2Y/fT4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Bjorn Andersson , Sasha Levin Subject: [PATCH 5.18 540/879] soc: qcom: smsm: Fix missing of_node_put() in smsm_parse_ipc Date: Tue, 7 Jun 2022 19:00:58 +0200 Message-Id: <20220607165018.547238284@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Miaoqian Lin [ Upstream commit aad66a3c78da668f4506356c2fdb70b7a19ecc76 ] The device_node pointer is returned by of_parse_phandle() with refcount incremented. We should use of_node_put() on it when done. Fixes: c97c4090ff72 ("soc: qcom: smsm: Add driver for Qualcomm SMSM") Signed-off-by: Miaoqian Lin Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220308073648.24634-1-linmq006@gmail.com Signed-off-by: Sasha Levin --- drivers/soc/qcom/smsm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/qcom/smsm.c b/drivers/soc/qcom/smsm.c index ef15d014c03a..9df9bba242f3 100644 --- a/drivers/soc/qcom/smsm.c +++ b/drivers/soc/qcom/smsm.c @@ -374,6 +374,7 @@ static int smsm_parse_ipc(struct qcom_smsm *smsm, unsigned host_id) return 0; host->ipc_regmap = syscon_node_to_regmap(syscon); + of_node_put(syscon); if (IS_ERR(host->ipc_regmap)) return PTR_ERR(host->ipc_regmap); -- 2.35.1