Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp257643yba; Mon, 1 Apr 2019 06:00:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDkRqXdL4ocmMm6V9ri/MIAWfcdodosjM1FKdpKZt0obdmNcyFWCpn+NCCwNN50Ivqzm3n X-Received: by 2002:a65:4802:: with SMTP id h2mr44135352pgs.98.1554123652372; Mon, 01 Apr 2019 06:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554123652; cv=none; d=google.com; s=arc-20160816; b=uezkjTnAVMF2QZQzzaNFR/1Pp4wdNeQzOJFHZJvUnVW6HOBrJfqwnEwuBrsD1daNPQ WthTPIE+r1P/4IuN8mkopvxhamBZ5DfEtGTYePg+v/Pbr5c5GjdbHP2ayie9v78OnZPW fq4aFEKhhZI5XZKBpVQ2cgwi72FCVO7cFBHNWdKjCpTuEDlIXHE0b8RZVo0q4c0O0YOt fMGb2QagmrcEIzQZ5uK/F1rUNgGHxTnvhHvw8CoUizOerGj4C5R3zUpBcrQRdqPRcakh VU1//kpgydMH1lL6/wTEYMp/EK+g+jD9GGhcpAFfCqcwvTSYljOjYLSFf/1nlSnXE2bh 70Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature; bh=i3ObEyhu7BBsEN+f2Ki0EOeARv08zpOjUtVxBvMxqX0=; b=zLuKM/BKvAk9Ytkve8Do8cTnwAr65WMX3Npiuppwc6WNNk7ukFgIIOYJNNxDFSUXZR nXbj+7kreonUuB4Xkm+n3knkwO5Dxj100mTHRLWU2DoFpFz4RkuO5O+TYh9KQDEoq1MB SSsQk74AHazNCCn64NeBHUG0avuKvNxDUPl4GQEnZ1Md3OfzX3GXwh9T+UcNI6yPlotj ufMm/j8YRKluGpqFNYRX4XB6Y43nHTVzFmhiL96h3bUdxULuNW01xpLPe1PLzKebsLEa wySnnhlF4IKxG6pYisY/LcyG7tBGbez/jnZgJhxFDpgdeexwkQVTTdskPg3BRcHYL7Pb za1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=fegv65Ra; dkim=pass header.i=@codeaurora.org header.s=default header.b=Aq2AVUjl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d34si9039255pld.314.2019.04.01.06.00.36; Mon, 01 Apr 2019 06:00:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=fegv65Ra; dkim=pass header.i=@codeaurora.org header.s=default header.b=Aq2AVUjl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726852AbfDAM6f (ORCPT + 99 others); Mon, 1 Apr 2019 08:58:35 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54222 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726473AbfDAM6f (ORCPT ); Mon, 1 Apr 2019 08:58:35 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8101060DB4; Mon, 1 Apr 2019 12:58:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554123513; bh=0xBviVaKUkBKrNXhOKl9/B2D7F7Hvk6JBKoH6gWQgAI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=fegv65RauP3mvAwkxn/DQJvFP60vTsvZQSTIyk5WCAc8wSPqQrNx2ZItYtdWJsJkh b4iIW9Jv16Ol1VEdvMldfJ5rPpoIqof7I9Z48lQ9QKs0gapz2xflBfVYk5ZldGb+5q hMjJq3NDF4M7EOMJdQkyIMevE/vRgUnG+R71ArOM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from [10.204.79.83] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mojha@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 39E2A6072E; Mon, 1 Apr 2019 12:58:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554123511; bh=0xBviVaKUkBKrNXhOKl9/B2D7F7Hvk6JBKoH6gWQgAI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Aq2AVUjlx1eiMCK6IvbMyXH7sHC8eCOeMlN4EqXeDjQkxlgcuqAIzn46LQ/Cl007r yAoO8ElXJD3J7oSQf12i7GOqponJPVUE9XTIbU5WXJYbzfFi3bBuUoGVa93WSEtA6g 112SyV0xYWjzWI4Hl6Zg7V+eso+bUwE9mED6TUrU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 39E2A6072E Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mojha@codeaurora.org Subject: Re: [PATCH 07/12] drm: omapdrm: add missing of_node_put after of_device_is_available To: Julia Lawall , Tomi Valkeinen Cc: kernel-janitors@vger.kernel.org, David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <1550928043-14889-1-git-send-email-Julia.Lawall@lip6.fr> <1550928043-14889-8-git-send-email-Julia.Lawall@lip6.fr> From: Mukesh Ojha Message-ID: <572cbf04-d97a-9807-75b5-2cf6f752667b@codeaurora.org> Date: Mon, 1 Apr 2019 18:28:23 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1550928043-14889-8-git-send-email-Julia.Lawall@lip6.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/23/2019 6:50 PM, Julia Lawall wrote: > 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: f2dd36ac9974c ("OMAPDSS: move 'compatible' converter to omapdss driver") > Signed-off-by: Julia Lawall Reviewed-by: Mukesh Ojha Cheers, -Mukesh > > --- > drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff -u -p a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c > --- a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c > +++ b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c > @@ -192,8 +192,10 @@ static int __init omapdss_boot_init(void > > dss = of_find_matching_node(NULL, omapdss_of_match); > > - if (dss == NULL || !of_device_is_available(dss)) > + if (dss == NULL || !of_device_is_available(dss)) { > + of_node_put(dss); > return 0; > + } > > omapdss_walk_device(dss, true); > >