Linux-LEDs Archive on
 help / color / Atom feed
From: Sakari Ailus <>
Subject: [PATCH 1/1] leds-as3645a: Drop fwnode reference on ignored node
Date: Wed,  4 Dec 2019 09:56:42 +0200
Message-ID: <> (raw)

If a node is ignored, do not get a reference to it. Fix the bug by moving
fwnode_handle_get() where a reference to an fwnode is saved for clarity.

Reported-by: Andy Shevchenko <>
Signed-off-by: Sakari Ailus <>
 drivers/leds/leds-as3645a.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c
index b7e0ae1af8fa5..e8922fa033796 100644
--- a/drivers/leds/leds-as3645a.c
+++ b/drivers/leds/leds-as3645a.c
@@ -493,16 +493,17 @@ static int as3645a_parse_node(struct as3645a *flash,
 		switch (id) {
 		case AS_LED_FLASH:
 			flash->flash_node = child;
+			fwnode_handle_get(child);
 			flash->indicator_node = child;
+			fwnode_handle_get(child);
 				 "unknown LED %u encountered, ignoring\n", id);
-		fwnode_handle_get(child);
 	if (!flash->flash_node) {

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-LEDs Archive on

Archives are clonable:
	git clone --mirror linux-leds/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-leds linux-leds/ \
	public-inbox-index linux-leds

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone