From: Fenglin Wu <quic_fenglinw@quicinc.com>
To: Fenglin Wu <quic_fenglinw@quicinc.com>,
<linux-arm-msm@vger.kernel.org>, Pavel Machek <pavel@ucw.cz>,
Lee Jones <lee@kernel.org>
Cc: <linux-leds@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v2 3/3] leds: flash: leds-qcom-flash: put child node if registration failed
Date: Tue, 25 Jul 2023 17:57:21 +0800 [thread overview]
Message-ID: <20230725-leds-qcom-flash-driver-tiny-fixes-v2-3-0f5cbce5fed0@quicinc.com> (raw)
In-Reply-To: <20230725-leds-qcom-flash-driver-tiny-fixes-v2-0-0f5cbce5fed0@quicinc.com>
Put the child node if register flash LED device failed.
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.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
next prev parent reply other threads:[~2023-07-25 9:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-25 9:57 [PATCH v2 0/3] leds-qcom-flash: several tiny fixes Fenglin Wu
2023-07-25 9:57 ` [PATCH v2 1/3] leds: flash: leds-qcom-flash: declare the driver as a module Fenglin Wu
2023-07-25 9:57 ` [PATCH v2 2/3] leds: flash: leds-qcom-flash: turn off LED before setting flash current Fenglin Wu
2023-07-25 9:57 ` Fenglin Wu [this message]
2023-07-28 11:17 ` [PATCH v2 0/3] leds-qcom-flash: several tiny fixes Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230725-leds-qcom-flash-driver-tiny-fixes-v2-3-0f5cbce5fed0@quicinc.com \
--to=quic_fenglinw@quicinc.com \
--cc=lee@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®