leds: flash: leds-qcom-flash: Put child node if registration failed
Put the child node if register flash LED device failed. Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com> Link: https://lore.kernel.org/r/20230725-leds-qcom-flash-driver-tiny-fixes-v2-3-0f5cbce5fed0@quicinc.com Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
7c47381c86
commit
546924102d
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue