Skip to contentSkip to conversation

leds: as3645a: Keep fwnode reference count balanced

PATCH In review Andy Shevchenko 1 participant 2 messages Apr 12, 2021 LED

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 leds: as3645a: Keep fwnode reference count balanced

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")
---
 drivers/leds/leds-as3645a.c | 1 +
 1 file changed, 1 insertion(+)
drivers/leds/leds-as3645a.c +1 -0
index e8922fa03379..50454d1c6090 100644
@@ -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");
Signature · 1 line
2.31.1
#1 lore raw
Quoted 3 lines · Andy Shevchenko

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.

Signature · 2 lines
With Best Regards,
Andy Shevchenko