Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1475007pxk; Fri, 25 Sep 2020 16:19:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiun8VT4RxleJWUpROD5JZU/xGttmU9iKna5bQDytadKL9yM8X6XIwZVcuWvi4uW5DcRrU X-Received: by 2002:a17:906:1157:: with SMTP id i23mr5352885eja.440.1601075968875; Fri, 25 Sep 2020 16:19:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601075968; cv=none; d=google.com; s=arc-20160816; b=WFnAGcOvhqtW5OVu+rY6jYL1aZ/HkGXpZYrhShlO7K/4BP8kG+pb41ZuEE/P8fCuX5 KU+VjRc+TMLrOsg7FVsNz0pIkoP1wl3iTnlEyJVKGDAi0LWp6z/Fp6iJBa6X7ZePzodf Z98W9qF1crqNRnBaWF66Erl18XfWb8hq20wm8Q9qaIByQRtLCmL3udzkdypTTXRP+f4r eTNe0SAiwxk93uBCjx7Bo0ndLhr8NV9BZiWBdx5Wklshrd/JjgOmfuFZwYs0JpEK0SsJ zP60D9XsGUpWZDZ4Fb61JtGtHjo1OL7uKKd2lmDpA32z9Urb+zGOPSju5QrmgUoz/aVu vS7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=hkciiatCQpjAnnbpzwfnwxHoPk567Oukdb0Pa7RZvUM=; b=vBHaiQmzJ1EwVGcKkddgtq7jrrxGe1RoHkfx66UvUn48Xs7JA7LOJQKxTEMTOJiwIS N2CwphyGdTXpKhMpPomJDzj+FzPf7eCoRFUZ9uva+xCB24qguooHAlj4fUIg9aUKufvu LJ/2J99uWtvgeiYCDwqAziHKnrIpCj0goylPeFM7isWbxWmFMteiE/AXjhFCC00PF5BA pk/c95nW0nuDO+P/ll5ExRZg2qXFgAfn4bRDAMA5ayciFWKl5xSU8aMZnVf1PeaovQtl Ep/5IRTOxGXzvwoBhOBEZ+cwTVV0+woeD+xWrtZyWcDgs90KGX59DE3c0LOeaZuf4o5o AL/Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nic.cz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si3254141edv.47.2020.09.25.16.19.05; Fri, 25 Sep 2020 16:19:28 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nic.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729022AbgIYXR7 (ORCPT + 99 others); Fri, 25 Sep 2020 19:17:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726348AbgIYXR7 (ORCPT ); Fri, 25 Sep 2020 19:17:59 -0400 Received: from mail.nic.cz (lists.nic.cz [IPv6:2001:1488:800:400::400]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E73DDC0613CE; Fri, 25 Sep 2020 16:17:58 -0700 (PDT) Received: from localhost (unknown [IPv6:2a0e:b107:ae1:0:3e97:eff:fe61:c680]) by mail.nic.cz (Postfix) with ESMTPSA id 52F07140079; Sat, 26 Sep 2020 01:17:56 +0200 (CEST) Date: Sat, 26 Sep 2020 01:17:55 +0200 From: Marek Behun To: Tobias Jordan Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Pavel Machek , Dan Murphy , Jean-Jacques Hiblot , Tomi Valkeinen Subject: Re: [PATCH] leds: tlc591xx: fix leak of device node iterator Message-ID: <20200926011755.01c5c645@nic.cz> In-Reply-To: <20200925231011.GA2450@agrajag.zerfleddert.de> References: <20200925231011.GA2450@agrajag.zerfleddert.de> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-100.0 required=5.9 tests=SHORTCIRCUIT, USER_IN_WELCOMELIST,USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.nic.cz X-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 26 Sep 2020 01:10:11 +0200 Tobias Jordan wrote: > 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); This won't apply on pavel's for-next tree, there is no check for EPROBE_DEFER, see https://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git/tree/drivers/leds/leds-tlc591xx.c?h=for-next