linux/drivers/leds/flash
Javier Carrasco e41d574b35 leds: mt6360: Fix memory leak in mt6360_init_isnk_properties()
The fwnode_for_each_child_node() loop requires manual intervention to
decrement the child refcount in case of an early return.

Add the missing calls to fwnode_handle_put(child) to avoid memory leaks
in the error paths.

Cc: stable@vger.kernel.org
Fixes: 679f865206 ("leds: Add mt6360 driver")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Link: https://lore.kernel.org/r/20240611-leds-mt6360-memleak-v1-1-93642eb5011e@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-26 16:56:10 +01:00
..
Kconfig leds: Make flash and multicolor dependencies unconditional 2024-03-07 08:48:03 +00:00
leds-aat1290.c leds: aat1290: Remove unused field 'torch_brightness' from 'struct aat1290_led' 2024-05-02 18:09:04 +01:00
leds-as3645a.c leds: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-21 11:57:11 +01:00
leds-ktd2692.c leds: ktd2692: Convert to use ExpressWire library 2024-03-07 08:45:08 +00:00
leds-lm3601x.c leds: lm3601x: Fix struct lm3601_led kernel-doc warnings 2024-03-07 08:48:15 +00:00
leds-max77693.c leds: Convert all platform drivers to return void 2023-11-01 11:28:35 +00:00
leds-mt6360.c leds: mt6360: Fix memory leak in mt6360_init_isnk_properties() 2024-06-26 16:56:10 +01:00
leds-mt6370-flash.c leds: mt6370: Annotate struct mt6370_priv with __counted_by 2023-11-01 11:28:41 +00:00
leds-qcom-flash.c leds: Convert all platform drivers to return void 2023-11-01 11:28:35 +00:00
leds-rt4505.c leds: rt4505: Add MODULE_DESCRIPTION() 2024-06-21 11:57:13 +01:00
leds-rt8515.c leds: Convert all platform drivers to return void 2023-11-01 11:28:35 +00:00
leds-sgm3140.c leds: sgm3140: Add missing timer cleanup and flash gpio control 2024-03-07 08:48:12 +00:00
Makefile leds: flash: mt6370: Add MediaTek MT6370 flashlight support 2023-03-23 14:54:08 +00:00