From: Jonathan Cameron <jic23@kernel.org>
To: Xu Wang <vulab@iscas.ac.cn>
Cc: lars@metafoo.de, Michael.Hennerich@analog.com, pmeerw@pmeerw.net,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: frequency: adf4350: Remove redundant null check before clk_disable_unprepare
Date: Tue, 29 Dec 2020 17:13:28 +0000 [thread overview]
Message-ID: <20201229171328.7f0e298d@archlinux> (raw)
In-Reply-To: <20201218094647.1386-1-vulab@iscas.ac.cn>
On Fri, 18 Dec 2020 09:46:47 +0000
Xu Wang <vulab@iscas.ac.cn> 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>
Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders
to see if they can find anything we missed.
Thanks,
Jonathan
> ---
> drivers/iio/frequency/adf4350.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c
> index 82c050a3899d..1462a6a5bc6d 100644
> --- a/drivers/iio/frequency/adf4350.c
> +++ b/drivers/iio/frequency/adf4350.c
> @@ -582,8 +582,7 @@ static int adf4350_probe(struct spi_device *spi)
> if (!IS_ERR(st->reg))
> regulator_disable(st->reg);
> error_disable_clk:
> - if (clk)
> - clk_disable_unprepare(clk);
> + clk_disable_unprepare(clk);
>
> return ret;
> }
> @@ -599,8 +598,7 @@ static int adf4350_remove(struct spi_device *spi)
>
> iio_device_unregister(indio_dev);
>
> - if (st->clk)
> - clk_disable_unprepare(st->clk);
> + clk_disable_unprepare(st->clk);
>
> if (!IS_ERR(reg))
> regulator_disable(reg);
prev parent reply other threads:[~2020-12-29 17:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-18 9:46 [PATCH] iio: frequency: adf4350: Remove redundant null check before clk_disable_unprepare Xu Wang
2020-12-29 17:13 ` Jonathan Cameron [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=20201229171328.7f0e298d@archlinux \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--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