Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp440209iog; Mon, 13 Jun 2022 06:04:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxteJNrOKiuQv6QlMlVnqGAjyDcLSYmJP2IU1jLmmectl+ZuelxkFSOcR7MDsZYrXn7q4Tf X-Received: by 2002:a17:907:88c3:b0:711:c65d:ff43 with SMTP id rq3-20020a17090788c300b00711c65dff43mr38226643ejc.182.1655125344533; Mon, 13 Jun 2022 06:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125344; cv=none; d=google.com; s=arc-20160816; b=NASWxQf/iayUV/2WVBE8g4FWm4V/DNC/bvO/V/9QkqpykrD4CdtxICNDqwoV9W1ei1 En51Uher4ysHZGkgHuSTu9iXLHQiGJagVyk/RtuqzuPsLz3QoehE0DChaosQkX4j9vte Tj3KDtmI2Pf9nIbflzHE6/wPUnk2K8cQWGFad4hAWxQEEifsNtBXEQ/Y5g6YmO2dTJAV tleXVpj8UcXHXLR4fJ4O8sHPuyZKQwKCAwF3NsuPBwZvGkNkkFLO/Yi+y9Y01acHahg2 +ZoIOQkS+5BYcUJP9r3a404BESD54GFK6pfTyPN9xB6s58wOcooHaNoVEVy/RQiA+45K BUoQ== 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=1gBYTpts8e9uPQ0tyAIeOxEFK/YkXHKBWrBhSf4QCEw=; b=qX0UK99TZTNhrOoOzAlPZUD7JYx+jJlp6r+WPL5j77K09pcq8ykqL8aq0wKF0WBQ7C DN4nwz8FrjGIZrpGgr5E/Tb9lF1svItSXTWqnjlYMcHGn1aJqVnyg+LZRBp40ND63HGd B7RRLL+n3hVmBBxFqMvWC3o409/VFy1K1xjqQWzWuT+C/T6QWBsGcYJKRosQzw/eTRbD /voliKwuEtDUeVoKRWtMWmqYN7XtTD5becq3lkDbGYEbI7K0LpwiINketUvnSQ9uBGTP FJVSkFU8b837hkWrSg7SzVH/qddO9PoikA+cBW90MINkpHXNSbGs9zsGEqjwFV63MoOg 2s4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vN5qSvrP; 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 oz6-20020a1709077d8600b00718ccb0a135si1205382ejc.507.2022.06.13.06.01.55; Mon, 13 Jun 2022 06:02:24 -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=vN5qSvrP; 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 S1345087AbiFMKsR (ORCPT + 99 others); Mon, 13 Jun 2022 06:48:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348830AbiFMKod (ORCPT ); Mon, 13 Jun 2022 06:44:33 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5685420F5A; Mon, 13 Jun 2022 03:25:32 -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 DD299B80E2D; Mon, 13 Jun 2022 10:25:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 528BBC341C5; Mon, 13 Jun 2022 10:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115929; bh=Hfk55HxADc5xy3PO/+ug1hrWudLc9RgZ5hh7EvdcrW8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vN5qSvrPxvXlNHIzx2AalD48ooC/WmW+J3/dpjSMtjFjSyU+KeuGPznhaYgO/L+GZ UdfEeGDSayscxF1aoiq0ZfAde6TvqaeC9KO0u4WB7AoLamio1bFVcMjV3pdRtbhn1s 027wBYsIC8M0VRLU6kzkVjIMqBXfz7DA4JO9LCP4= 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 4.14 082/218] soc: qcom: smsm: Fix missing of_node_put() in smsm_parse_ipc Date: Mon, 13 Jun 2022 12:09:00 +0200 Message-Id: <20220613094922.995169323@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@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=-8.3 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 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: 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 2b49d2c212da..5304529b41c9 100644 --- a/drivers/soc/qcom/smsm.c +++ b/drivers/soc/qcom/smsm.c @@ -367,6 +367,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