* [PATCH -next] soc: aspeed-lpc-ctrl: Fix missing clk_disable_unprepare() on error in aspeed_lpc_ctrl_probe()
@ 2021-08-23 13:00 Yang Yingliang
2021-08-24 4:52 ` Joel Stanley
0 siblings, 1 reply; 3+ messages in thread
From: Yang Yingliang @ 2021-08-23 13:00 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-aspeed, joel, andrew
Fix the missing clk_disable_unprepare() before return
from aspeed_lpc_ctrl_probe() in the error handling case.
Fixes: 2f9b25fa6682 ("soc: aspeed: Re-enable FWH2AHB on AST2600")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/soc/aspeed/aspeed-lpc-ctrl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/aspeed/aspeed-lpc-ctrl.c b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
index 6893c5ec3259..f4c989584d6b 100644
--- a/drivers/soc/aspeed/aspeed-lpc-ctrl.c
+++ b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
@@ -312,7 +312,8 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
lpc_ctrl->scu = syscon_regmap_lookup_by_compatible("aspeed,ast2600-scu");
if (IS_ERR(lpc_ctrl->scu)) {
dev_err(dev, "couldn't find scu\n");
- return PTR_ERR(lpc_ctrl->scu);
+ rc = PTR_ERR(lpc_ctrl->scu);
+ goto err;
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] soc: aspeed-lpc-ctrl: Fix missing clk_disable_unprepare() on error in aspeed_lpc_ctrl_probe()
2021-08-23 13:00 [PATCH -next] soc: aspeed-lpc-ctrl: Fix missing clk_disable_unprepare() on error in aspeed_lpc_ctrl_probe() Yang Yingliang
@ 2021-08-24 4:52 ` Joel Stanley
2021-08-24 7:39 ` Yang Yingliang
0 siblings, 1 reply; 3+ messages in thread
From: Joel Stanley @ 2021-08-24 4:52 UTC (permalink / raw)
To: Yang Yingliang; +Cc: Linux Kernel Mailing List, linux-aspeed, Andrew Jeffery
On Mon, 23 Aug 2021 at 12:55, Yang Yingliang <yangyingliang@huawei.com> wrote:
>
> Fix the missing clk_disable_unprepare() before return
> from aspeed_lpc_ctrl_probe() in the error handling case.
>
> Fixes: 2f9b25fa6682 ("soc: aspeed: Re-enable FWH2AHB on AST2600")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/soc/aspeed/aspeed-lpc-ctrl.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/soc/aspeed/aspeed-lpc-ctrl.c b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
> index 6893c5ec3259..f4c989584d6b 100644
> --- a/drivers/soc/aspeed/aspeed-lpc-ctrl.c
> +++ b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
> @@ -312,7 +312,8 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
> lpc_ctrl->scu = syscon_regmap_lookup_by_compatible("aspeed,ast2600-scu");
> if (IS_ERR(lpc_ctrl->scu)) {
> dev_err(dev, "couldn't find scu\n");
> - return PTR_ERR(lpc_ctrl->scu);
> + rc = PTR_ERR(lpc_ctrl->scu);
> + goto err;
Thanks for the patch. Alternatively, we could move this code above the
devm_clk_get/clk_prepare_enable. I would prefer that option, if you
want to send a v2.
Cheers,
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] soc: aspeed-lpc-ctrl: Fix missing clk_disable_unprepare() on error in aspeed_lpc_ctrl_probe()
2021-08-24 4:52 ` Joel Stanley
@ 2021-08-24 7:39 ` Yang Yingliang
0 siblings, 0 replies; 3+ messages in thread
From: Yang Yingliang @ 2021-08-24 7:39 UTC (permalink / raw)
To: Joel Stanley; +Cc: Linux Kernel Mailing List, linux-aspeed, Andrew Jeffery
Hi,
On 2021/8/24 12:52, Joel Stanley wrote:
> On Mon, 23 Aug 2021 at 12:55, Yang Yingliang <yangyingliang@huawei.com> wrote:
>> Fix the missing clk_disable_unprepare() before return
>> from aspeed_lpc_ctrl_probe() in the error handling case.
>>
>> Fixes: 2f9b25fa6682 ("soc: aspeed: Re-enable FWH2AHB on AST2600")
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>> ---
>> drivers/soc/aspeed/aspeed-lpc-ctrl.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/soc/aspeed/aspeed-lpc-ctrl.c b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
>> index 6893c5ec3259..f4c989584d6b 100644
>> --- a/drivers/soc/aspeed/aspeed-lpc-ctrl.c
>> +++ b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
>> @@ -312,7 +312,8 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
>> lpc_ctrl->scu = syscon_regmap_lookup_by_compatible("aspeed,ast2600-scu");
>> if (IS_ERR(lpc_ctrl->scu)) {
>> dev_err(dev, "couldn't find scu\n");
>> - return PTR_ERR(lpc_ctrl->scu);
>> + rc = PTR_ERR(lpc_ctrl->scu);
>> + goto err;
> Thanks for the patch. Alternatively, we could move this code above the
> devm_clk_get/clk_prepare_enable. I would prefer that option, if you
> want to send a v2.
I can send a v2.
Thanks,
Yang
>
> Cheers,
>
> Joel
> .
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-24 7:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23 13:00 [PATCH -next] soc: aspeed-lpc-ctrl: Fix missing clk_disable_unprepare() on error in aspeed_lpc_ctrl_probe() Yang Yingliang
2021-08-24 4:52 ` Joel Stanley
2021-08-24 7:39 ` Yang Yingliang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).