Linux-LEDs Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v1 1/1] leds: as3645a: Keep fwnode reference count balanced
@ 2021-04-12 10:38 Andy Shevchenko
  2021-04-12 11:25 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2021-04-12 10:38 UTC (permalink / raw)
  To: Andy Shevchenko, linux-leds, linux-kernel; +Cc: Sakari Ailus, Pavel Machek

The commit 88b7e9ffe594 ("leds: as3645a: Switch to fwnode property API")
missed the point that loop counter should be put after use. Otherwise
the reference count of it will become unbalanced.

Fixes: 88b7e9ffe594 ("leds: as3645a: Switch to fwnode property API")
Fixes: 22cb0a76e005 ("leds-as3645a: Drop fwnode reference on ignored node")
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
 drivers/leds/leds-as3645a.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c
index e8922fa03379..50454d1c6090 100644
--- a/drivers/leds/leds-as3645a.c
+++ b/drivers/leds/leds-as3645a.c
@@ -505,6 +505,7 @@ static int as3645a_parse_node(struct as3645a *flash,
 			break;
 		}
 	}
+	fwnode_handle_put(fwnode);
 
 	if (!flash->flash_node) {
 		dev_err(&flash->client->dev, "can't find flash node\n");
-- 
2.31.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] leds: as3645a: Keep fwnode reference count balanced
  2021-04-12 10:38 [PATCH v1 1/1] leds: as3645a: Keep fwnode reference count balanced Andy Shevchenko
@ 2021-04-12 11:25 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2021-04-12 11:25 UTC (permalink / raw)
  To: linux-leds, linux-kernel; +Cc: Sakari Ailus, Pavel Machek

On Mon, Apr 12, 2021 at 01:38:38PM +0300, Andy Shevchenko wrote:
> The commit 88b7e9ffe594 ("leds: as3645a: Switch to fwnode property API")
> missed the point that loop counter should be put after use. Otherwise
> the reference count of it will become unbalanced.

Scratch this, I might be not slept enough.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 10:38 [PATCH v1 1/1] leds: as3645a: Keep fwnode reference count balanced Andy Shevchenko
2021-04-12 11:25 ` Andy Shevchenko

Linux-LEDs Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-leds/0 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/ https://lore.kernel.org/linux-leds \
		linux-leds@vger.kernel.org
	public-inbox-index linux-leds

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-leds


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git