Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1491202pxk; Fri, 25 Sep 2020 16:57:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkbWlzo6F3O2c/DNFrxCnc7Z3w4vaSTKEaHIL7YNiKoCUJTOCqWShtc8sNPtUARBkMFrdX X-Received: by 2002:a50:d65e:: with SMTP id c30mr4069220edj.57.1601078258316; Fri, 25 Sep 2020 16:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601078258; cv=none; d=google.com; s=arc-20160816; b=wkFszdK3BbQiQWlyA45xKm3Ku3XNtxAlhgWruHNUaynnKABy7YeBGkGAxDF1Sa0C7j p/UlhhJY5kVojY8ku6JLqUNUJb1hzRPsWeylpWN42co79JzJHCFpV8LpruAznxhZNjwE ENZRlqAUVrRT8k1/VTQg3s7/lv/UTORwIOYzpWhWlUAm9JDBbjTcnuv03PY86MuHRFyp WxkBaLJ8Yq/lUt9mUgRYE2KprSLdfTpZVgdca1VS1SEExw1fVdlTcOCXNzxFKAxmvM7a 0vaw4CJUI1F32TvpPi+ArLiyzpn1pJXiOMRY4Dr67Jy0b//GnAJgKbqv36Zv+8UMhki5 EJNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :message-id:subject:to:from:date; bh=gkvl0cabgjbW5uRsxn2gt/arXYgbEvFzJS6SP418D6k=; b=ORkUKSwciiE4kWL1j3H32kveUYR0c/SNk4ZWweWsqu2Dk+wxMqKlG26jmgCAwKxEkY jEBGsf68oemDT5MF+4a+HsI1f17YsY5Mj8l5FFOaiMP/nlA9op6q0yFir0i3Fxa1vYiP v2QwrogFGWjbanfMujvBrTPC2NYGJXIyhzQKxeHx1NjG/CRIn2D/pXAB4cvSsc9l9GoI IM2BRzWy1XQtgxe2EB36/L7TtO+W29C9M1SJTT+Z1lo3G/qj0+KBKeuGxVBh02qOHeko janZxOh7XilKtJeqMaO/CIS//DQ8FDChMLgnicUKBweJ/Prwe/lTakJMahbLq3aJ/P/k IhMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bl4si3072793ejb.579.2020.09.25.16.57.15; Fri, 25 Sep 2020 16:57:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726773AbgIYXzn (ORCPT + 99 others); Fri, 25 Sep 2020 19:55:43 -0400 Received: from agrajag.zerfleddert.de ([88.198.237.222]:39618 "EHLO agrajag.zerfleddert.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726119AbgIYXzm (ORCPT ); Fri, 25 Sep 2020 19:55:42 -0400 Received: by agrajag.zerfleddert.de (Postfix, from userid 1000) id BAA945B2057C; Sat, 26 Sep 2020 01:55:41 +0200 (CEST) Date: Sat, 26 Sep 2020 01:55:41 +0200 From: Tobias Jordan To: Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] bus: arm: integrator: fix device node iterator leak Message-ID: <20200925235541.GA28030@agrajag.zerfleddert.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the for_each_available_child_of_node loop of integrator_lm_populate, add a call to of_node_put to avoid leaking the iterator if we bail out. Fixes: ccea5e8a5918 ("bus: Add driver for Integrator/AP logic modules") Signed-off-by: Tobias Jordan --- drivers/bus/arm-integrator-lm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bus/arm-integrator-lm.c b/drivers/bus/arm-integrator-lm.c index 845b6c43fef8..cb6da80d1c7d 100644 --- a/drivers/bus/arm-integrator-lm.c +++ b/drivers/bus/arm-integrator-lm.c @@ -53,6 +53,7 @@ static int integrator_lm_populate(int num, struct device *dev) base); ret = of_platform_default_populate(child, NULL, dev); if (ret) { + of_node_put(child); dev_err(dev, "failed to populate module\n"); return ret; } -- 2.20.1