From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, USER_AGENT_GIT 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 BEE28C43381 for ; Sat, 23 Feb 2019 13:59:47 +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 90524206B6 for ; Sat, 23 Feb 2019 13:59:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hpWZUhkJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 90524206B6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lip6.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=czBuDE8h6tx/UZJ7orgqRniCDolWfUYdr5dFw4Nw3lM=; b=hpWZUhkJStsDiOTeqqPYxJpb0u P/1qyRHthRNDl7w2gGVO9Sl+ZMKw47z6fAupSuvArj9/GwbRerO8MazwM/DArGGHHjX/pflAU8frD FP76KNJEY1G9J0bRyneW86tVmDEdTYWl0sUUHTJOHAvIGpJ/Tkx73WErBAUwfM1MyEwv5ssoFaw6K kZnCCGEPfb+eX9hucTNh+IfKFXE9TjOj8hq9gFd530XJZdNYDsXYhJ4GjA1V4jMI6Gvpkt+t5ffAU Nxr5pHEjeC1QrSrhgecwbo10SMngaIY1eQrQYjumL49G8JpPjcmpMxwjaXEtWP5mla6emLsTWk7bd pietUmCA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gxXq6-00066K-Vg; Sat, 23 Feb 2019 13:59:38 +0000 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gxXpV-0005HL-3u for linux-arm-kernel@lists.infradead.org; Sat, 23 Feb 2019 13:59:04 +0000 X-IronPort-AV: E=Sophos;i="5.58,403,1544482800"; d="scan'208";a="370609510" Received: from palace.lip6.fr ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 23 Feb 2019 14:58:44 +0100 From: Julia Lawall To: Tony Lindgren Subject: [PATCH 11/12] ARM: OMAP2+: add missing of_node_put after of_device_is_available Date: Sat, 23 Feb 2019 14:20:42 +0100 Message-Id: <1550928043-14889-12-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1550928043-14889-1-git-send-email-Julia.Lawall@lip6.fr> References: <1550928043-14889-1-git-send-email-Julia.Lawall@lip6.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190223_055901_779611_B7B2315F X-CRM114-Status: UNSURE ( 9.09 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-omap@vger.kernel.org, kernel-janitors@vger.kernel.org, Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add an of_node_put when a tested device node is not available. The semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ identifier f; local idexpression e; expression x; @@ e = f(...); ... when != of_node_put(e) when != x = e when != e = x when any if (<+...of_device_is_available(e)...+>) { ... when != of_node_put(e) ( return e; | + of_node_put(e); return ...; ) } // Fixes: e0c827aca0730 ("drm/omap: Populate DSS children in omapdss driver") Signed-off-by: Julia Lawall --- arch/arm/mach-omap2/display.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -u -p a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c @@ -250,8 +250,10 @@ static int __init omapdss_init_of(void) if (!node) return 0; - if (!of_device_is_available(node)) + if (!of_device_is_available(node)) { + of_node_put(node); return 0; + } pdev = of_find_device_by_node(node); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel