Commit 54692410 authored by Fenglin Wu's avatar Fenglin Wu Committed by Lee Jones

leds: flash: leds-qcom-flash: Put child node if registration failed

Put the child node if register flash LED device failed.
Signed-off-by: default avatarFenglin Wu <quic_fenglinw@quicinc.com>
Link: https://lore.kernel.org/r/20230725-leds-qcom-flash-driver-tiny-fixes-v2-3-0f5cbce5fed0@quicinc.comSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 7c47381c
...@@ -749,6 +749,7 @@ static int qcom_flash_led_probe(struct platform_device *pdev) ...@@ -749,6 +749,7 @@ static int qcom_flash_led_probe(struct platform_device *pdev)
return 0; return 0;
release: release:
fwnode_handle_put(child);
while (flash_data->v4l2_flash[flash_data->leds_count] && flash_data->leds_count) while (flash_data->v4l2_flash[flash_data->leds_count] && flash_data->leds_count)
v4l2_flash_release(flash_data->v4l2_flash[flash_data->leds_count--]); v4l2_flash_release(flash_data->v4l2_flash[flash_data->leds_count--]);
return rc; return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment