mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
leds: lt3593: Put fwnode in any case during ->probe()
[ Upstream commit7e1baaaa24
] device_get_next_child_node() bumps a reference counting of a returned variable. We have to balance it whenever we return to the caller. Fixes:8cd7d6daba
("leds: lt3593: Add device tree probing glue") Cc: Daniel Mack <daniel@zonque.org> Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e39c73563a
commit
0a01dc7766
1 changed files with 2 additions and 3 deletions
|
@ -103,10 +103,9 @@ static int lt3593_led_probe(struct platform_device *pdev)
|
|||
init_data.default_label = ":";
|
||||
|
||||
ret = devm_led_classdev_register_ext(dev, &led_data->cdev, &init_data);
|
||||
if (ret < 0) {
|
||||
fwnode_handle_put(child);
|
||||
fwnode_handle_put(child);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
led_data->cdev.dev->of_node = dev->of_node;
|
||||
platform_set_drvdata(pdev, led_data);
|
||||
|
|
Loading…
Reference in a new issue