diff mbox series

[v2,3/3] leds: flash: leds-qcom-flash: put child node if registration failed

Message ID 20230725-leds-qcom-flash-driver-tiny-fixes-v2-3-0f5cbce5fed0@quicinc.com
State Accepted
Commit 546924102de8327a5b2095d2134faed6de971476
Headers show
Series [v2,1/3] leds: flash: leds-qcom-flash: declare the driver as a module | expand

Commit Message

Fenglin Wu July 25, 2023, 9:57 a.m. UTC
Put the child node if register flash LED device failed.

Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
---
 drivers/leds/flash/leds-qcom-flash.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/leds/flash/leds-qcom-flash.c b/drivers/leds/flash/leds-qcom-flash.c
index 29cf09479422..a73d3ea5c97a 100644
--- a/drivers/leds/flash/leds-qcom-flash.c
+++ b/drivers/leds/flash/leds-qcom-flash.c
@@ -749,6 +749,7 @@  static int qcom_flash_led_probe(struct platform_device *pdev)
 	return 0;
 
 release:
+	fwnode_handle_put(child);
 	while (flash_data->v4l2_flash[flash_data->leds_count] && flash_data->leds_count)
 		v4l2_flash_release(flash_data->v4l2_flash[flash_data->leds_count--]);
 	return rc;