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] [day] [month] [year] [list]
Message-ID: <CAMRc=McM4X5--dUFUmGricbC_DYubpVk+CMD3odQLCkjxwFzWg@mail.gmail.com>
Date:   Mon, 16 May 2022 22:16:53 +0200
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     Wan Jiabing <wanjiabing@...o.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: ftgpio: Remove unneeded ERROR check before clk_disable_unprepare

On Mon, May 16, 2022 at 10:50 AM Wan Jiabing <wanjiabing@...o.com> wrote:
>
> clk_disable_unprepare() already checks ERROR by using IS_ERR_OR_NULL.
> Remove unneeded ERROR check for g->clk.
>
> Signed-off-by: Wan Jiabing <wanjiabing@...o.com>
> ---
>  drivers/gpio/gpio-ftgpio010.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpio-ftgpio010.c b/drivers/gpio/gpio-ftgpio010.c
> index b90a45c939a4..f422c3e129a0 100644
> --- a/drivers/gpio/gpio-ftgpio010.c
> +++ b/drivers/gpio/gpio-ftgpio010.c
> @@ -315,8 +315,8 @@ static int ftgpio_gpio_probe(struct platform_device *pdev)
>         return 0;
>
>  dis_clk:
> -       if (!IS_ERR(g->clk))
> -               clk_disable_unprepare(g->clk);
> +       clk_disable_unprepare(g->clk);
> +
>         return ret;
>  }
>
> @@ -324,8 +324,8 @@ static int ftgpio_gpio_remove(struct platform_device *pdev)
>  {
>         struct ftgpio_gpio *g = platform_get_drvdata(pdev);
>
> -       if (!IS_ERR(g->clk))
> -               clk_disable_unprepare(g->clk);
> +       clk_disable_unprepare(g->clk);
> +
>         return 0;
>  }
>
> --
> 2.36.1
>

Applied, thanks!

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ