Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1535426pxk; Fri, 25 Sep 2020 18:25:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNjMJW4UREs1JKmx0gySnWWnNP6aBaQLcMI+44LX+28LR5cTR35qrCWjBMmBgD4bmXZoc7 X-Received: by 2002:a17:906:6409:: with SMTP id d9mr5362855ejm.344.1601083553824; Fri, 25 Sep 2020 18:25:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601083553; cv=none; d=google.com; s=arc-20160816; b=BW9UrW+3G91v5nzC/P0aRaoOXJrshVLh/10afuxJy0uOkCab/gVDlLF6KfTyKacNo+ lmHcqP45qNHXKW/ueqk5z+7BmjpaMmRsyFEm9DKX80+PErArHvouPq6mfQvexco7E1Be IxtiG4ZtoPfzyOYpkL4PKHP0yvSlqQVUcByyvuDtRFTbrvgp3FsWmZKKrWDacceW7KxG aoe+HBbAfxwRLqSIWTRjvBGRYFIvbjT9u3PTq0mxcNWkkoJkBZ99xShYZTY3gkIaK2z5 SDoYnGa+vo9itn9J8TIE6tvzP6FISxC/vsQINLH9PQIjbBd6kUdcP47UM4ang9U30djv NwEA== 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 :dkim-signature; bh=9RCaa8RJtUlz0RaREwxWVtTdI/GJh7zsYjXxxSL0zK4=; b=jGylENsvVLCaoSYMKYx2JNDlF36UyG83IcsXgiR+2Ay4gv1ybNxl4AGh7tBqpXFzio dGKEvK8S7iKxewNzQb331Rdv1r4RTxA1rLTch3PitD1B6NIfUd5Az/amRMH/H5JMH1bb COwkCP5J1oUNUmHsimgF5EPjjkzTUxWgnE/dafjg1Ykhbfb8XwmxBkFFtF6sohYaoCyf IaNcX1gpAaO3swzr3XUOepX6vmrBbxgcvLSdeUDMd+iHNVlT/+oEK14QBKwes/2PzK9d 0ZyIPYCp7nxjszJquZft1HGivQypeF3L4pzBtF634CgYqm8HYyi3pU1i41VQw1Kkf5r9 LRqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tbFKkwON; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t21si3318669edy.123.2020.09.25.18.25.27; Fri, 25 Sep 2020 18:25:53 -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; dkim=pass header.i=@kernel.org header.s=default header.b=tbFKkwON; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729874AbgIZBY1 (ORCPT + 99 others); Fri, 25 Sep 2020 21:24:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:56568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728935AbgIZBYL (ORCPT ); Fri, 25 Sep 2020 21:24:11 -0400 Received: from localhost (otava-0257.koleje.cuni.cz [78.128.181.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 786C020878; Sat, 26 Sep 2020 01:24:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601083450; bh=0ufQlNsRRx9NSNO7HzrPQhwnxasobcXS489JmiK12sk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tbFKkwONDpAHgYcVZan/Q48SIV5/6eI8ZrOubYyRdFPKTFTE7gL4KoSAIphDpHTww Fawdl4e2FsEb+yeGTAOcDXV+1jiARuZ0gNBrdbw5Adrz8U5BCTwS4RJdGHcYypiEOY EnyFgF8rrFH8lbMXsJu93/PJgUFkMV+3oQD4Gf+g= Date: Sat, 26 Sep 2020 03:24:06 +0200 From: Marek =?UTF-8?B?QmVow7pu?= 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 v2] leds: tlc591xx: fix leak of device node iterator Message-ID: <20200926032406.00c7cfb2@kernel.org> In-Reply-To: <20200926005117.GA32209@agrajag.zerfleddert.de> References: <20200926005117.GA32209@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=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 26 Sep 2020 02:51:17 +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. >=20 > Fixes: 1ab4531ad132 ("leds: tlc591xx: simplify driver by using the > managed led API") >=20 > Signed-off-by: Tobias Jordan > --- > v2: rebased to Pavel's for-next branch >=20 > drivers/leds/leds-tlc591xx.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c > index f24271337bd8..5b9dfdf743ec 100644 > --- a/drivers/leds/leds-tlc591xx.c > +++ b/drivers/leds/leds-tlc591xx.c > @@ -205,10 +205,12 @@ tlc591xx_probe(struct i2c_client *client, > led->ldev.max_brightness =3D TLC591XX_MAX_BRIGHTNESS; > err =3D devm_led_classdev_register_ext(dev, &led->ldev, > &init_data); > - if (err < 0) > + if (err < 0) { > + of_node_put(child); > return dev_err_probe(dev, err, > "couldn't register LED %s\n", > led->ldev.name); > + } > } > return 0; > } Reviewed-by: Marek Beh=C3=BAn