public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Xu Wang <vulab@iscas.ac.cn>
Cc: mchehab@kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: Re: [PATCH] media: i2c: mt9p031: Remove redundant null check before clk_disable_unprepare
Date: Thu, 5 Nov 2020 01:52:09 +0200	[thread overview]
Message-ID: <20201104235209.GP29958@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20201104092948.8560-1-vulab@iscas.ac.cn>

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@iscas.ac.cn>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.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

      reply	other threads:[~2020-11-04 23:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04  9:29 [PATCH] media: i2c: mt9p031: Remove redundant null check before clk_disable_unprepare Xu Wang
2020-11-04 23:52 ` Laurent Pinchart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201104235209.GP29958@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=vulab@iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox