From patchwork Mon Jan 23 21:16:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 9533515 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 91C6F6042D for ; Mon, 23 Jan 2017 21:17:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83FB1283FD for ; Mon, 23 Jan 2017 21:17:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78A262841F; Mon, 23 Jan 2017 21:17:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 250B0283FD for ; Mon, 23 Jan 2017 21:17:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751338AbdAWVRL (ORCPT ); Mon, 23 Jan 2017 16:17:11 -0500 Received: from smtp08.smtpout.orange.fr ([80.12.242.130]:42327 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751016AbdAWVRK (ORCPT ); Mon, 23 Jan 2017 16:17:10 -0500 Received: from localhost.localdomain ([92.140.159.158]) by mwinf5d16 with ME id bxH31u00l3RLdrQ03xH4Xh; Mon, 23 Jan 2017 22:17:08 +0100 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 23 Jan 2017 22:17:08 +0100 X-ME-IP: 92.140.159.158 From: Christophe JAILLET To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@kernel.org, kgene@kernel.org, krzk@kernel.org, javier@osg.samsung.com Cc: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] [media] exynos4-is: Add missing 'of_node_put' Date: Mon, 23 Jan 2017 22:16:56 +0100 Message-Id: <20170123211656.11185-1-christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.9.3 X-Antivirus: avast! (VPS 170123-0, 23/01/2017), Outbound message X-Antivirus-Status: Clean Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It is likely that a "of_node_put(ep)" is missing here. There is one in the previous error handling code, and one a few lines below in the normal case as well. Signed-off-by: Christophe JAILLET --- drivers/media/platform/exynos4-is/media-dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index e3a8709138fa..da5b76c1df98 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -402,8 +402,10 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd, return ret; } - if (WARN_ON(endpoint.base.port == 0) || index >= FIMC_MAX_SENSORS) + if (WARN_ON(endpoint.base.port == 0) || index >= FIMC_MAX_SENSORS) { + of_node_put(ep); return -EINVAL; + } pd->mux_id = (endpoint.base.port - 1) & 0x1;