From: Fenglin Wu Date: Tue, 25 Jul 2023 09:57:21 +0000 (+0800) Subject: leds: flash: leds-qcom-flash: Put child node if registration failed X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=546924102de8327a5b2095d2134faed6de971476;p=linux.git 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 Link: https://lore.kernel.org/r/20230725-leds-qcom-flash-driver-tiny-fixes-v2-3-0f5cbce5fed0@quicinc.com Signed-off-by: Lee Jones --- diff --git a/drivers/leds/flash/leds-qcom-flash.c b/drivers/leds/flash/leds-qcom-flash.c index 29cf094794227..a73d3ea5c97a3 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;