Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1470802pxk; Fri, 25 Sep 2020 16:11:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxm9OYU3VL3rD6fGVLZCsnWc+/gR2iOMr4m34hfL3SiI9lSdNPTfiqCvvOK4k3PbsMNOaug X-Received: by 2002:a17:906:b097:: with SMTP id x23mr4931303ejy.21.1601075496338; Fri, 25 Sep 2020 16:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601075496; cv=none; d=google.com; s=arc-20160816; b=1IWxurJGOvx2xarLYs8XjtEwvPgU/sNqOhUArAfrvBHp5/rudzg7r4zYjQNcfh+TVT B7VXX+RNs6IrXhHch2g58WVDIGrOy/QY4azQUilJNtfqVYrFeyS6JwWr9wOl0psLADRl /mB5Ed8fGT9n8g70Z9+2mVCZeW77fHg54/OrPiAtABEq9ak3/FEUL8bqaLap42jDjcAN k7ZbzEskSMKrlT218Aeo0FJ57kRlneCUWk4FjekmNmkq7UQMiXo7nAKBu1aiKqXBxV9X XchRUp2IFfeKCmYKx8bj+xGmtUA9rWdHziHO60SQGPnPJOqStlLTi9IvwZnxDp/t0uvf 0NBQ== 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:cc:to:from:date; bh=dRslFYR9cIon6bkXsOb+PtFnfEd5/ap6Wldygjj1Re4=; b=VWyPH2cpgFGGz+bN++RC37/svOPkgpT2gTl6pjVl4YHfRstfaZw8XGCiJ0Rab/ElU+ K8n/sDYFtBcqpyan1NAWfmk9OXd4A/axrDd41p/OBDewLhdBz0P5px0+EZ0rolGfS8cy 9F6w5GHGWt/q0FWy2SOTpad4f7aN/6YZHorUUTbiaWd5Bo0ZovpmUuLrCWfSr4oAIZWB zh/9cKAxTI4bSXPfb8rMZoBpuWngS/wZftkS1yaP1XG8GpazaKS0EWZFKnqcoJms9Odl IaP8JWbdlsDmKHnH2Qn6lgvbC+DKBTHqbT5gH11plJtY6YbHrvHYjeUjygaKDmEW0j5a KvGw== 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 v2si2770445ejw.741.2020.09.25.16.11.12; Fri, 25 Sep 2020 16:11:36 -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 S1729154AbgIYXKO (ORCPT + 99 others); Fri, 25 Sep 2020 19:10:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728612AbgIYXKN (ORCPT ); Fri, 25 Sep 2020 19:10:13 -0400 X-Greylist: delayed 667 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 25 Sep 2020 16:10:13 PDT Received: from agrajag.zerfleddert.de (agrajag.zerfleddert.de [IPv6:2a01:4f8:bc:1de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98FB5C0613CE; Fri, 25 Sep 2020 16:10:13 -0700 (PDT) Received: by agrajag.zerfleddert.de (Postfix, from userid 1000) id 0EEBC5B2096F; Sat, 26 Sep 2020 01:10:12 +0200 (CEST) Date: Sat, 26 Sep 2020 01:10:11 +0200 From: Tobias Jordan To: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Pavel Machek , Dan Murphy , Jean-Jacques Hiblot , Tomi Valkeinen Subject: [PATCH] leds: tlc591xx: fix leak of device node iterator Message-ID: <20200925231011.GA2450@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 one of the error paths of the for_each_child_of_node loop in tlc591xx_probe, add missing call to of_node_put. Fixes: 1ab4531ad132 ("leds: tlc591xx: simplify driver by using the managed led API") Signed-off-by: Tobias Jordan --- drivers/leds/leds-tlc591xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c index 0929f1275814..a8cc49752cd5 100644 --- a/drivers/leds/leds-tlc591xx.c +++ b/drivers/leds/leds-tlc591xx.c @@ -214,6 +214,7 @@ tlc591xx_probe(struct i2c_client *client, err = devm_led_classdev_register_ext(dev, &led->ldev, &init_data); if (err < 0) { + of_node_put(child); if (err != -EPROBE_DEFER) dev_err(dev, "couldn't register LED %s\n", led->ldev.name); -- 2.20.1