Re: [PATCH -next] i2c: davinci: fix PM disable depth imbalance in davinci_i2c_probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 27, 2022 at 5:29 PM Zhang Qilong <zhangqilong3@xxxxxxxxxx> wrote:
>
> The pm_runtime_enable will increase power disable depth. Thus a
> pairing decrement is needed on the error handling path to keep
> it balanced according to context.
>
> Fixes:17f88151ff190 ("i2c: davinci: Add PM Runtime Support")
> Signed-off-by: Zhang Qilong <zhangqilong3@xxxxxxxxxx>
> ---
>  drivers/i2c/busses/i2c-davinci.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
> index 471c47db546b..c836cf884185 100644
> --- a/drivers/i2c/busses/i2c-davinci.c
> +++ b/drivers/i2c/busses/i2c-davinci.c
> @@ -823,7 +823,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
>         r = pm_runtime_resume_and_get(dev->dev);
>         if (r < 0) {
>                 dev_err(dev->dev, "failed to runtime_get device: %d\n", r);
> -               return r;
> +               goto err_pm;
>         }
>
>         i2c_davinci_init(dev);
> @@ -882,6 +882,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
>  err_unuse_clocks:
>         pm_runtime_dont_use_autosuspend(dev->dev);
>         pm_runtime_put_sync(dev->dev);
> +err_pm:
>         pm_runtime_disable(dev->dev);
>
>         return r;
> --
> 2.25.1
>

Reviewed-by: Bartosz Golaszewski <brgl@xxxxxxxx>

What is it with this [PATCH -next] tag people use everywhere now? This
tag should mean that the patch fixes something that's already in next.
The commit in question is 5 years old. Just use [PATCH].

Bart



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux