[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230725-leds-qcom-flash-driver-tiny-fixes-v2-3-0f5cbce5fed0@quicinc.com>
Date: Tue, 25 Jul 2023 17:57:21 +0800
From: Fenglin Wu <quic_fenglinw@...cinc.com>
To: Fenglin Wu <quic_fenglinw@...cinc.com>,
<linux-arm-msm@...r.kernel.org>, Pavel Machek <pavel@....cz>,
Lee Jones <lee@...nel.org>
CC: <linux-leds@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH v2 3/3] 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@...cinc.com>
---
drivers/leds/flash/leds-qcom-flash.c | 1 +
1 file changed, 1 insertion(+)
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;
--
2.25.1
Powered by blists - more mailing lists