From patchwork Sat Aug 28 11:04:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12463387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C336EC432BE for ; Sat, 28 Aug 2021 11:06:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8518C60E77 for ; Sat, 28 Aug 2021 11:06:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8518C60E77 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=inria.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=xWlrC2CBbZPrWBKwgwKFrWZmIwTTYwXTkCuAN/DX4eI=; b=j+5YdY6pVA+Ibj CBykEIZuIqf+tUKc2BMQDh11/TTBx26fvw2U7QkTuoqmGeNQn4v9mMdd5DQpd2EZPW0WrGMVCB64T 7egywP5tq/wJziHf3P0vngt53R7PEu1CkCe5LC+rsFZeEhYWB1F53E1nPjyd5sQD6byRvpEe7525K xFIFvudCURiHYAiGcrtLShj7EJ3Mgj/NkOMhQShQVtme5zpYjpaWlKA69Mr8IA0GvU03QucR7F086 nq/QnKL1it25CY6794KD5JZa4ho7iroRjP1J/IA9T5YQfwPBWqpGZHN/NI0ZeSIhE74n4x3/TkR4T A8q9julmsWFmXkoeYKew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mJw95-00E5ic-6i; Sat, 28 Aug 2021 11:05:07 +0000 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mJw90-00E5fJ-Qq for linux-arm-kernel@lists.infradead.org; Sat, 28 Aug 2021 11:05:04 +0000 IronPort-HdrOrdr: A9a23:wnV+jq0A1F6awbqqHksX7AqjBLkkLtp133Aq2lEZdPU1SL37qynApp8mPHPP4gr5O0tQ+uxoWpPgfZq0z/cc3WB7B9mftWfd1FdAYLsD0aLShwylISH4++JHvJ0MT4F1ArTLYmRHsQ== X-IronPort-AV: E=Sophos;i="5.84,326,1620684000"; d="scan'208";a="391310565" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2021 13:04:54 +0200 Date: Sat, 28 Aug 2021 13:04:54 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Rohit Athavale cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org, Rohit Athavale , Michal Simek , Hyun Kwon , Laurent Pinchart , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] v4l: xilinx-vpss-csc: fix for_each_child.cocci warnings Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210828_040503_189669_E3C54E06 X-CRM114-Status: GOOD ( 11.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: kernel test robot for_each_child_of_node should have of_node_put() before return. Generated by: scripts/coccinelle/iterators/for_each_child.cocci CC: Rohit Athavale Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall --- tree: https://github.com/Xilinx/linux-xlnx master head: 45cd0074cdf1ddd710b28848e6a860b442babfcc commit: 7d47a653da2e81cb73f43e507664d36305819ea1 [10741/12418] v4l: xilinx-vpss-csc: driver support for xilinx vpss csc :::::: branch date: 5 days ago :::::: commit date: 5 months ago Please take the patch only if it's a positive warning. Thanks! xilinx-vpss-csc.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/media/platform/xilinx/xilinx-vpss-csc.c +++ b/drivers/media/platform/xilinx/xilinx-vpss-csc.c @@ -749,17 +749,20 @@ static int xcsc_parse_of(struct xcsc_dev vip_format = xvip_of_get_format(port); if (IS_ERR(vip_format)) { dev_err(dev, "Invalid media pad format in DT"); + of_node_put(port); return PTR_ERR(vip_format); } rval = of_property_read_u32(port, "reg", &port_id); if (rval < 0) { dev_err(dev, "No reg in DT to specify pad"); + of_node_put(port); return rval; } if (port_id != 0 && port_id != 1) { dev_err(dev, "Invalid reg in DT"); + of_node_put(port); return -EINVAL; } xcsc->vip_formats[port_id] = vip_format;