From patchwork Tue Jan 26 00:41:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 8117081 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 29217BEEED for ; Tue, 26 Jan 2016 00:42:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6FD3C2034F for ; Tue, 26 Jan 2016 00:42:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 75A4720380 for ; Tue, 26 Jan 2016 00:42:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932863AbcAZAmG (ORCPT ); Mon, 25 Jan 2016 19:42:06 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:28669 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932687AbcAZAmC (ORCPT ); Mon, 25 Jan 2016 19:42:02 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O1J00GM7B9ZCR00@mailout1.w1.samsung.com>; Tue, 26 Jan 2016 00:41:59 +0000 (GMT) X-AuditID: cbfec7f4-f79026d00000418a-6b-56a6c0d73dd6 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 3F.58.16778.7D0C6A65; Tue, 26 Jan 2016 00:41:59 +0000 (GMT) Received: from localhost.localdomain ([10.113.63.52]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O1J002XRB9O5800@eusync4.samsung.com>; Tue, 26 Jan 2016 00:41:59 +0000 (GMT) From: Krzysztof Kozlowski To: Kyungmin Park , Sylwester Nawrocki , Mauro Carvalho Chehab , Kukjin Kim , Krzysztof Kozlowski , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Javier Martinez Canillas Subject: [RFT 2/2] [media] exynos4-is: Add missing port parent of_node_put on error paths Date: Tue, 26 Jan 2016 09:41:46 +0900 Message-id: <1453768906-28979-2-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1453768906-28979-1-git-send-email-k.kozlowski@samsung.com> References: <1453768906-28979-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrILMWRmVeSWpSXmKPExsVy+t/xa7rXDywLM9izlMfizds1TBavXxha 9D9+zWxxtukNu8Wmx9dYLS7vmsNm0bNhK6vFjPP7mCxWP6uwOPymndWBy2PTqk42j81L6j22 9N9l9+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6M43+nMxW85ahYd+AqSwPjefYuRk4OCQET iTcNVxghbDGJC/fWs3UxcnEICSxllFh07gQjhPOfUeJb4xYmkCo2AWOJzcuXgFWJCDxnklg0 bSrYKGYBU4nHd9ezgNjCAtESnR9XgzWwCKhK/GxaABbnFXCXeDZjB9Q6OYmTxyazgticAh4S O/q+gNUIAdXsbF7CMoGRdwEjwypG0dTS5ILipPRcQ73ixNzi0rx0veT83E2MkID7soNx8TGr Q4wCHIxKPLwbCpaFCbEmlhVX5h5ilOBgVhLh3bsXKMSbklhZlVqUH19UmpNafIhRmoNFSZx3 7q73IUIC6YklqdmpqQWpRTBZJg5OqQbGeScfy60K+Cl0b0ZQ77KJZ3eaBt7/YndV3b03QShw +podGgeNevjdxd9aN7Icq+hs1FF9cJhloqV197E0JUOP1fWbV/DXn9x6b0+t3vnLzQ9V9IXs SqN3yft7PrFvvhC/QV9U+Jb4ta1xN1Ztr38UPLXqokpNcqPn0U8ND07vrFhl3LHqtf4aJZbi jERDLeai4kQAup90ozQCAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In fimc_md_parse_port_node() remote port parent node is get with of_graph_get_remote_port_parent() but it is not put on error path. Fixes: fa91f1056f17 ("[media] exynos4-is: Add support for asynchronous subdevices registration") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas --- Not tested on hardware, only built+static checkers. --- 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 de0977479327..d2e564878e06 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -385,8 +385,10 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd, else pd->fimc_bus_type = pd->sensor_bus_type; - if (WARN_ON(index >= ARRAY_SIZE(fmd->sensor))) + if (WARN_ON(index >= ARRAY_SIZE(fmd->sensor))) { + of_node_put(rem); return -EINVAL; + } fmd->sensor[index].asd.match_type = V4L2_ASYNC_MATCH_OF; fmd->sensor[index].asd.match.of.node = rem;