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: <20201104235209.GP29958@pendragon.ideasonboard.com>
Date:   Thu, 5 Nov 2020 01:52:09 +0200
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     Xu Wang <vulab@...as.ac.cn>
Cc:     mchehab@...nel.org, linux-media@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Sakari Ailus <sakari.ailus@...ux.intel.com>
Subject: Re: [PATCH] media: i2c: mt9p031: Remove redundant null check before
 clk_disable_unprepare

Hi Xu Wang,

Thank you for the patch.

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

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

I expect Sakari will pick this patch.

> ---
>  drivers/media/i2c/mt9p031.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c
> index dc23b9ed510a..a633b934d93e 100644
> --- a/drivers/media/i2c/mt9p031.c
> +++ b/drivers/media/i2c/mt9p031.c
> @@ -346,8 +346,7 @@ static void mt9p031_power_off(struct mt9p031 *mt9p031)
>  	regulator_bulk_disable(ARRAY_SIZE(mt9p031->regulators),
>  			       mt9p031->regulators);
>  
> -	if (mt9p031->clk)
> -		clk_disable_unprepare(mt9p031->clk);
> +	clk_disable_unprepare(mt9p031->clk);
>  }
>  
>  static int __mt9p031_set_power(struct mt9p031 *mt9p031, bool on)

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ