diff mbox series

[-next] power: supply: ab8500: add missing destroy_workqueue in ab8500_charger_bind

Message ID 20220512093844.1109923-1-zhengbin13@huawei.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series [-next] power: supply: ab8500: add missing destroy_workqueue in ab8500_charger_bind | expand

Commit Message

Zheng Bin May 12, 2022, 9:38 a.m. UTC
ab8500_charger_bind misses destroy_workqueue in error path,
this patch fixes that.

Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/power/supply/ab8500_charger.c | 1 +
 1 file changed, 1 insertion(+)

--
2.31.1

Comments

Zheng Bin June 7, 2022, 1:16 p.m. UTC | #1
friendly ping

On 2022/5/12 17:38, Zheng Bin wrote:
> ab8500_charger_bind misses destroy_workqueue in error path,
> this patch fixes that.
>
> Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
> ---
>   drivers/power/supply/ab8500_charger.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
> index d04d087caa50..a5d055a628e7 100644
> --- a/drivers/power/supply/ab8500_charger.c
> +++ b/drivers/power/supply/ab8500_charger.c
> @@ -3378,6 +3378,7 @@ static int ab8500_charger_bind(struct device *dev)
>   	ret = component_bind_all(dev, di);
>   	if (ret) {
>   		dev_err(dev, "can't bind component devices\n");
> +		destroy_workqueue(di->charger_wq);
>   		return ret;
>   	}
>
> --
> 2.31.1
>
> .
>
Sebastian Reichel June 9, 2022, 10:22 p.m. UTC | #2
Hi,

On Thu, May 12, 2022 at 05:38:44PM +0800, Zheng Bin wrote:
> ab8500_charger_bind misses destroy_workqueue in error path,
> this patch fixes that.
> 
> Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
> ---

LGTM, but adding Linus to Cc and waiting a bit to give him time to
react.

-- Sebastian

>  drivers/power/supply/ab8500_charger.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
> index d04d087caa50..a5d055a628e7 100644
> --- a/drivers/power/supply/ab8500_charger.c
> +++ b/drivers/power/supply/ab8500_charger.c
> @@ -3378,6 +3378,7 @@ static int ab8500_charger_bind(struct device *dev)
>  	ret = component_bind_all(dev, di);
>  	if (ret) {
>  		dev_err(dev, "can't bind component devices\n");
> +		destroy_workqueue(di->charger_wq);
>  		return ret;
>  	}
> 
> --
> 2.31.1
>
Zheng Bin June 16, 2022, 6:10 a.m. UTC | #3
On 2022/6/10 6:22, Sebastian Reichel wrote:
> Hi,
>
> On Thu, May 12, 2022 at 05:38:44PM +0800, Zheng Bin wrote:
>> ab8500_charger_bind misses destroy_workqueue in error path,
>> this patch fixes that.
>>
>> Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
>> ---
> LGTM, but adding Linus to Cc and waiting a bit to give him time to
> react.
>
> -- Sebastian
ping
>
>>   drivers/power/supply/ab8500_charger.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
>> index d04d087caa50..a5d055a628e7 100644
>> --- a/drivers/power/supply/ab8500_charger.c
>> +++ b/drivers/power/supply/ab8500_charger.c
>> @@ -3378,6 +3378,7 @@ static int ab8500_charger_bind(struct device *dev)
>>   	ret = component_bind_all(dev, di);
>>   	if (ret) {
>>   		dev_err(dev, "can't bind component devices\n");
>> +		destroy_workqueue(di->charger_wq);
>>   		return ret;
>>   	}
>>
>> --
>> 2.31.1
>>
Linus Walleij June 23, 2022, 2:20 p.m. UTC | #4
On Fri, Jun 10, 2022 at 12:22 AM Sebastian Reichel
<sebastian.reichel@collabora.com> wrote:
> On Thu, May 12, 2022 at 05:38:44PM +0800, Zheng Bin wrote:
> > ab8500_charger_bind misses destroy_workqueue in error path,
> > this patch fixes that.
> >
> > Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
> > ---
>
> LGTM, but adding Linus to Cc and waiting a bit to give him time to
> react.

Don't have the original patch in my inbox so can't test it, but looks
reasonable so:
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Sebastian Reichel July 16, 2022, 11:08 p.m. UTC | #5
Hi,

On Thu, Jun 23, 2022 at 04:20:52PM +0200, Linus Walleij wrote:
> On Fri, Jun 10, 2022 at 12:22 AM Sebastian Reichel
> <sebastian.reichel@collabora.com> wrote:
> > On Thu, May 12, 2022 at 05:38:44PM +0800, Zheng Bin wrote:
> > > ab8500_charger_bind misses destroy_workqueue in error path,
> > > this patch fixes that.
> > >
> > > Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
> > > ---
> >
> > LGTM, but adding Linus to Cc and waiting a bit to give him time to
> > react.
> 
> Don't have the original patch in my inbox so can't test it, but looks
> reasonable so:
> Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks, queued.

-- Sebastian
diff mbox series

Patch

diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
index d04d087caa50..a5d055a628e7 100644
--- a/drivers/power/supply/ab8500_charger.c
+++ b/drivers/power/supply/ab8500_charger.c
@@ -3378,6 +3378,7 @@  static int ab8500_charger_bind(struct device *dev)
 	ret = component_bind_all(dev, di);
 	if (ret) {
 		dev_err(dev, "can't bind component devices\n");
+		destroy_workqueue(di->charger_wq);
 		return ret;
 	}