Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1918758pxk; Sat, 26 Sep 2020 09:29:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJp0VXSvQTrAow6IlnyQS5zHWzvdW3Lxi6j75TgeaT8qq6Vx8nSzgvzLMppetQvYiI8NJd X-Received: by 2002:a17:906:3f89:: with SMTP id b9mr8167345ejj.463.1601137782134; Sat, 26 Sep 2020 09:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601137782; cv=none; d=google.com; s=arc-20160816; b=wyh0LHaFzGcFhC+rn9nCcKTBnNzmeiurSlaKq3H84SwgZnbrglKbD60QUE1XLc0oHV /6AtuL9lgpI28u7I73tWpJNFwNy/sxr4FR7vRfsTRKo+d/VR9SfI8+58v31/q25N/FFa NWagO16/XVa6629JAV2sQxcqlj/euQxoHG9o1GGVgIjd4eZh74cTqh6xT2eiC4k7XUOP +73nnpdJ32rXolRH2Edm5SQrlC1ykXwvTNJgqDZUaEFMiRsosAdD8o1SJU5BGrGjVwUA /Elao0J7z2/Z52ls1kZS71OwuPF5zpCwrZtlv0fV8IYtcLLsJ8mWVNByiAcc78jmkB3n YrNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date; bh=GLh1CAB+e9gnNsF3P9lbsL0jhl3LGMExpWApTGiH2jo=; b=coPpInrZpg6IU4EkkphhaFNyV7hCxowz368BV4L/yvFenh/rSfPqh4siLU4Tfe/h3L 9Ky/Tihl5D2YWet7lpeztPFUHLvbN/yuhMSMfVEpBBUFxajKNJdFyYgdpKM17JSdea2P w0+Ehc7uFpZJqhd3fziD+pQYddWUqxugwOF6lr/prJE3VXEjzLTJ1UAfakjpPfaBNERj ZikdacdTGO/DfEE414MZZ8fbgs13Cvf1vPMmDay/BhMqtPV8L6FoEIjyyoy2LaMXAdi+ 2kKdGTQLIPP7GnZ5/fKJFkJl59nI8k7fp1e8P6QbsIaB1+RVYLgDKs3y8xj/0gFbJnMw m2ag== 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 rn4si1216143ejb.593.2020.09.26.09.29.18; Sat, 26 Sep 2020 09:29:42 -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 S1729877AbgIZQ16 (ORCPT + 99 others); Sat, 26 Sep 2020 12:27:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725208AbgIZQ15 (ORCPT ); Sat, 26 Sep 2020 12:27:57 -0400 Received: from agrajag.zerfleddert.de (agrajag.zerfleddert.de [IPv6:2a01:4f8:bc:1de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 851EDC0613CE; Sat, 26 Sep 2020 09:27:57 -0700 (PDT) Received: by agrajag.zerfleddert.de (Postfix, from userid 1000) id 1B0415B2053C; Sat, 26 Sep 2020 18:27:56 +0200 (CEST) Date: Sat, 26 Sep 2020 18:27:56 +0200 From: Tobias Jordan To: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Pavel Machek , Dan Murphy , Tomi Valkeinen , Marek =?iso-8859-1?Q?Beh=FAn?= , Markus Elfring Subject: [PATCH v3] leds: tlc591xx: fix leak of device node iterator Message-ID: <20200926162755.GA26532@agrajag.zerfleddert.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 Reviewed-by: Marek Beh?n --- v3: removed linebreak from Fixes: tag in commit message v2: rebased to Pavel's for-next branch 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