]> www.infradead.org Git - users/hch/block.git/commitdiff
auxdisplay: ht16k33: Drop reference after LED registration
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 4 Jun 2024 15:02:15 +0000 (17:02 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 11 Jun 2024 13:58:52 +0000 (16:58 +0300)
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: c223d9c636ed ("auxdisplay: ht16k33: Add LED support")
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/auxdisplay/ht16k33.c

index ce987944662c8bee6dc2fd3fcec6faf1bbbaad52..8a7034b41d50e8f0ab1228000bb4b703f277e825 100644 (file)
@@ -483,6 +483,7 @@ static int ht16k33_led_probe(struct device *dev, struct led_classdev *led,
        led->max_brightness = MAX_BRIGHTNESS;
 
        err = devm_led_classdev_register_ext(dev, led, &init_data);
+       fwnode_handle_put(init_data.fwnode);
        if (err)
                dev_err(dev, "Failed to register LED\n");