lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 9 May 2022 19:13:56 +0000
From:   <Eugen.Hristev@...rochip.com>
To:     <linmq006@...il.com>, <mchehab@...nel.org>,
        <Nicolas.Ferre@...rochip.com>, <alexandre.belloni@...tlin.com>,
        <Ludovic.Desroches@...rochip.com>, <hverkuil-cisco@...all.nl>,
        <linux-media@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] media: atmel: atmel-isc: Fix PM disable depth
 imbalance in atmel_isc_probe

On 3/7/22 10:16 AM, Miaoqian Lin wrote:
> The pm_runtime_enable will decrease power disable depth.
> If the probe fails, we should use pm_runtime_disable() to balance
> pm_runtime_enable().
> 
> Fixes: 0a0e265 ("media: atmel: atmel-isc: split driver into driver base and isc")
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>

Reviewed-by: Eugen Hristev <eugen.hristev@...rochip.com>

> ---
> changes in v2:
> - remove unused label.
> changes in v3:
> - add disable_pm label and update related 'goto'
> - update commit message
> ---
>   drivers/media/platform/atmel/atmel-sama5d2-isc.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/atmel/atmel-sama5d2-isc.c b/drivers/media/platform/atmel/atmel-sama5d2-isc.c
> index 1b2063cce0f7..949035cdb846 100644
> --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c
> +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c
> @@ -538,7 +538,7 @@ static int atmel_isc_probe(struct platform_device *pdev)
>          ret = clk_prepare_enable(isc->ispck);
>          if (ret) {
>                  dev_err(dev, "failed to enable ispck: %d\n", ret);
> -               goto cleanup_subdev;
> +               goto disable_pm;
>          }
> 
>          /* ispck should be greater or equal to hclock */
> @@ -556,6 +556,9 @@ static int atmel_isc_probe(struct platform_device *pdev)
>   unprepare_clk:
>          clk_disable_unprepare(isc->ispck);
> 
> +disable_pm:
> +       pm_runtime_disable(dev);
> +
>   cleanup_subdev:
>          isc_subdev_cleanup(isc);
> 
> --
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ