mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
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: c223d9c636
("auxdisplay: ht16k33: Add LED support")
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
parent
632691ad83
commit
2ccfe94bc3
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user