summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorFenglin Wu <quic_fenglinw@quicinc.com>2023-07-25 17:57:21 +0800
committerLee Jones <lee@kernel.org>2023-07-28 12:17:40 +0100
commit546924102de8327a5b2095d2134faed6de971476 (patch)
treec84bdca8c927774934c74155942ce832f18ab738 /drivers/leds
parent7c47381c8664d55861036d1d858daf5e9d5d67b8 (diff)
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>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/flash/leds-qcom-flash.c1
1 files changed, 1 insertions, 0 deletions
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;