Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1430086yba; Sun, 14 Apr 2019 09:50:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxo7/911i6FctgtM05aI8CENtkT1gDt0IxjZy8NZ0P2RnWplBpkVTR1tDGE0jTXREKKFU+i X-Received: by 2002:a63:fa54:: with SMTP id g20mr62414017pgk.242.1555260615491; Sun, 14 Apr 2019 09:50:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555260615; cv=none; d=google.com; s=arc-20160816; b=0HJdR0RiVMxSdGa6f60qVAEt8V1LQCB8jcX4P6HKFzFBDW7pSNMh6BmQqBzJmht58i rxgpnGinCFpZgFPCu3wsaeOA+OoeJAkhYrUkc/LP063fKcl3D4jB9AjDAC1q2P78mLmS Q6PioJ1YnE/AB1Ro6Nl+EL3kTIYOwosGVtLvZCkQPE9qnHgK+AXYfVV78B4wJszLyk4U VoCv+yag6d6FxkWHN27EROY0lAR9K7iYmtud8wfi/jzV78vhFK8D5gmojnrsHxW3VOS9 V6L+ggxaBLd/mMKL1eAzgJOZuczKTm+euGaTnFMkWqgo0aOeteJFuSDXWi9e11KNJE9j 71dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=+6y+xPeLPYPHQ9uT//2Ihoxz5b+u4w4SxVPfTHsgnWw=; b=znOTiqT7reQxGqzqBxgotUbeJIKU7711UXVG6xXY1UpWEw1RMyELtjPwEiujUlHzAj cOfkVeUMz47MlGBklPwnoQwiKvcZHjiFB7YV7O/pLtBt+U9S3qLDpV4DmnBXzTsTnvOT Syj/YKLzN31znd0xPZKARZ+f0s1L+UgsIEdnHZEBk38GHVNrVp6rl14w3BXEAMK7kbh9 aTd3rvmJ4ViaqqZKWSv5yzCBNK+GofWKDEgpWiEWtgY0whlXc725AxQ1+Bsd+gyEZExT rDqfoubMZUDglDKkfW/+u39TdGoxD+YMParYbucTYCsHp23HgUzhf7+FibQfYsf1k5wC HT8w== ARC-Authentication-Results: i=1; mx.google.com; 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 p5si11586138plo.273.2019.04.14.09.49.59; Sun, 14 Apr 2019 09:50:15 -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; 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 S1726968AbfDNQtP (ORCPT + 99 others); Sun, 14 Apr 2019 12:49:15 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:17236 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbfDNQtO (ORCPT ); Sun, 14 Apr 2019 12:49:14 -0400 X-IronPort-AV: E=Sophos;i="5.60,350,1549926000"; d="scan'208";a="378569733" Received: from abo-75-106-68.mrs.modulonet.fr (HELO hadrien) ([85.68.106.75]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Apr 2019 18:49:12 +0200 Date: Sun, 14 Apr 2019 18:49:12 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Markus Elfring cc: Tony Lindgren , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King Subject: Re: [11/12] ARM: OMAP2+: add missing of_node_put after of_device_is_available In-Reply-To: <903ec107-46ed-f19f-56a7-c20031247503@web.de> Message-ID: References: <1550928043-14889-12-git-send-email-Julia.Lawall@lip6.fr> <903ec107-46ed-f19f-56a7-c20031247503@web.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 14 Apr 2019, Markus Elfring wrote: > > @@ -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); > > Is there a need to put the node also in subsequent if branches > for complete exception handling in this function implementation? Yes, it looks like this is indeed missing. I will try to send a better patch when time permits. julia