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: <X9+SyT5fHfAlzKG9@pendragon.ideasonboard.com>
Date:   Sun, 20 Dec 2020 20:07:05 +0200
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     Xu Wang <vulab@...as.ac.cn>
Cc:     a.hajda@...sung.com, narmstrong@...libre.com, jonas@...boo.se,
        jernej.skrabec@...l.net, airlied@...ux.ie, daniel@...ll.ch,
        sam@...nborg.org, bogdan.togorean@...log.com,
        laurentiu.palcu@....com, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm: bridge: adv7511: Remove redundant null check before
 clk_disable_unprepare

Hi Xu Wang,

Thank you for the patch.

On Fri, Nov 27, 2020 at 09:18:29AM +0000, Xu Wang wrote:
> Because clk_disable_unprepare() already checked NULL clock parameter,
> so the additional check is unnecessary, just remove them.
> 
> Signed-off-by: Xu Wang <vulab@...as.ac.cn>

Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>

> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index a0d392c338da..76555ae64e9c 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -1292,8 +1292,7 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
>  
>  err_unregister_cec:
>  	i2c_unregister_device(adv7511->i2c_cec);
> -	if (adv7511->cec_clk)
> -		clk_disable_unprepare(adv7511->cec_clk);
> +	clk_disable_unprepare(adv7511->cec_clk);
>  err_i2c_unregister_packet:
>  	i2c_unregister_device(adv7511->i2c_packet);
>  err_i2c_unregister_edid:
> @@ -1311,8 +1310,7 @@ static int adv7511_remove(struct i2c_client *i2c)
>  	if (adv7511->type == ADV7533 || adv7511->type == ADV7535)
>  		adv7533_detach_dsi(adv7511);
>  	i2c_unregister_device(adv7511->i2c_cec);
> -	if (adv7511->cec_clk)
> -		clk_disable_unprepare(adv7511->cec_clk);
> +	clk_disable_unprepare(adv7511->cec_clk);
>  
>  	adv7511_uninit_regulators(adv7511);
>  

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ