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: <a9dd6b8a-f5a0-fc7e-fc59-b71a4048d178@xs4all.nl>
Date:   Thu, 9 Jun 2022 11:27:08 +0200
From:   Hans Verkuil <hverkuil@...all.nl>
To:     Guo Zhengkui <guozhengkui@...o.com>,
        Eugen Hristev <eugen.hristev@...rochip.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Claudiu Beznea <claudiu.beznea@...rochip.com>,
        "open list:MICROCHIP ISC DRIVER" <linux-media@...r.kernel.org>,
        "moderated list:ARM/Microchip (AT91) SoC support" 
        <linux-arm-kernel@...ts.infradead.org>,
        open list <linux-kernel@...r.kernel.org>
Cc:     zhengkui_guo@...look.com
Subject: Re: [PATCH] media: atmel: atmel-isc: remove unneeded IS_ERR()

Hi Guo Zhengkui,

On 5/19/22 08:52, Guo Zhengkui wrote:
> There has already been error check in clk_unregister(), so remove error
> check before calling clk_unregister().
> 
> Signed-off-by: Guo Zhengkui <guozhengkui@...o.com>
> ---
>  drivers/media/platform/atmel/atmel-isc-clk.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/atmel/atmel-isc-clk.c b/drivers/media/platform/atmel/atmel-isc-clk.c
> index 2059fe376b00..9decd8fb03d5 100644
> --- a/drivers/media/platform/atmel/atmel-isc-clk.c
> +++ b/drivers/media/platform/atmel/atmel-isc-clk.c
> @@ -304,8 +304,7 @@ void isc_clk_cleanup(struct isc_device *isc)
>  	for (i = 0; i < ARRAY_SIZE(isc->isc_clks); i++) {
>  		struct isc_clk *isc_clk = &isc->isc_clks[i];
>  
> -		if (!IS_ERR(isc_clk->clk))
> -			clk_unregister(isc_clk->clk);
> +		clk_unregister(isc_clk->clk);

Actually, clk_unregister does this:

        if (!clk || WARN_ON_ONCE(IS_ERR(clk)))
                return;

So if IS_ERR(clk) is true, then a warning will be issued, and that's not what you want.

I'm rejecting this patch.

Regards,

	Hans


>  	}
>  }
>  EXPORT_SYMBOL_GPL(isc_clk_cleanup);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ