Skip to content

Commit 2ccfe94

Browse files
elfringandy-shev
authored andcommitted
auxdisplay: ht16k33: Drop reference after LED registration
The reference count is bumped by device_get_named_child_node() and never dropped. Since LED APIs do not require it to be bumped by the user, drop the reference after LED registration. [andy: rewritten the commit message and amended the change] Fixes: c223d9c ("auxdisplay: ht16k33: Add LED support") Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 632691a commit 2ccfe94

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/auxdisplay/ht16k33.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ static int ht16k33_led_probe(struct device *dev, struct led_classdev *led,
483483
led->max_brightness = MAX_BRIGHTNESS;
484484

485485
err = devm_led_classdev_register_ext(dev, led, &init_data);
486+
fwnode_handle_put(init_data.fwnode);
486487
if (err)
487488
dev_err(dev, "Failed to register LED\n");
488489

0 commit comments

Comments
 (0)