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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 30 Sep 2022 11:23:13 +0200
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     Jianqun Xu <jay.xu@...k-chips.com>
Cc:     linus.walleij@...aro.org, heiko@...ech.de,
        andriy.shevchenko@...ux.intel.com, robert.moore@...el.com,
        robh@...nel.org, linux-rockchip@...ts.infradead.org,
        linux-kernel@...r.kernel.org, lenb@...nel.org, rafael@...nel.org
Subject: Re: [PATCH 13/20] gpio/rockchip: disable and put clocks when remove

On Tue, Sep 20, 2022 at 12:31 PM Jianqun Xu <jay.xu@...k-chips.com> wrote:
>
> Match to the probe, do disable and put the clocks when module to remove.
>
> Signed-off-by: Jianqun Xu <jay.xu@...k-chips.com>
> ---
>  drivers/gpio/gpio-rockchip.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
> index 511e93a6a429..1a800f972594 100644
> --- a/drivers/gpio/gpio-rockchip.c
> +++ b/drivers/gpio/gpio-rockchip.c
> @@ -757,7 +757,10 @@ static int rockchip_gpio_remove(struct platform_device *pdev)
>  {
>         struct rockchip_pin_bank *bank = platform_get_drvdata(pdev);
>
> +       clk_put(bank->clk);
> +       clk_put(bank->db_clk);
>         clk_disable_unprepare(bank->clk);
> +       clk_disable_unprepare(bank->db_clk);
>         gpiochip_remove(&bank->gpio_chip);
>
>         return 0;
> --
> 2.25.1
>

You're putting the clock before disabling it? That doesn't look right.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ