From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 232CB846C for ; Fri, 10 Mar 2023 14:30:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65968C433EF; Fri, 10 Mar 2023 14:30:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678458656; bh=RmXnX4O5gi5wdoQMcgShlUdW8JUpiGkDCnDglZCJ81M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o1Bv+RwIvqbKnMn8RcTETlvQB2NBTIfkeclKAfxOeRrGKx25T+OYmWCQGvEE0fokd 7Q0GLoD+ZvN19UZ4YHAlOlko8ppxkEAuv2f18EOa5GwSyuOacEjwqOgYg23NnriHuM yvSFsZgqKH9ib2HY3Jxo26LImXlVTReSUHKB7Ajg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Liang He , Philipp Zabel , Sasha Levin Subject: [PATCH 5.4 101/357] gpu: ipu-v3: common: Add of_node_put() for reference returned by of_graph_get_port_by_id() Date: Fri, 10 Mar 2023 14:36:30 +0100 Message-Id: <20230310133738.461992021@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310133733.973883071@linuxfoundation.org> References: <20230310133733.973883071@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Liang He [ Upstream commit 9afdf98cfdfa2ba8ec068cf08c5fcdc1ed8daf3f ] In ipu_add_client_devices(), we need to call of_node_put() for reference returned by of_graph_get_port_by_id() in fail path. Fixes: 17e052175039 ("gpu: ipu-v3: Do not bail out on missing optional port nodes") Signed-off-by: Liang He Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20220720152227.1288413-1-windhl@126.com Signed-off-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20220720152227.1288413-1-windhl@126.com Signed-off-by: Sasha Levin --- drivers/gpu/ipu-v3/ipu-common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index b3dae9ec1a38b..528812bf84da7 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c @@ -1235,6 +1235,7 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base) pdev = platform_device_alloc(reg->name, id++); if (!pdev) { ret = -ENOMEM; + of_node_put(of_node); goto err_register; } -- 2.39.2