From: Jonathan Cameron <jic23@kernel.org>
To: Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-iio@vger.kernel.org>
Subject: Re: [PATCH] iio: frequency: admv1014: return -EINVAL directly
Date: Fri, 19 Aug 2022 18:08:56 +0100 [thread overview]
Message-ID: <20220819180856.5a1d4e5a@jic23-huawei> (raw)
In-Reply-To: <20220819104117.4600-1-antoniu.miclaus@analog.com>
On Fri, 19 Aug 2022 13:41:17 +0300
Antoniu Miclaus <antoniu.miclaus@analog.com> wrote:
> Remove extra step where the error code is assigned to the `ret`
> variable.
>
> Return instead error code directly.
>
> Fixes: f4eb9ac ("iio: frequency: admv1014: add support for ADMV1014")
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Change is fine, but I've dropped the fixes tag. The code before this
wasn't broken, just longer than it needed to be. We don't want the noise
of this getting backported because someone sees the fixes tag and thinks
there is a reason it needs to be.
Applied to the togreg branch of iio.git
Thanks,
Jonathan
> ---
> drivers/iio/frequency/admv1014.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/iio/frequency/admv1014.c b/drivers/iio/frequency/admv1014.c
> index 865addd10db4..bb5e1feef42b 100644
> --- a/drivers/iio/frequency/admv1014.c
> +++ b/drivers/iio/frequency/admv1014.c
> @@ -669,8 +669,7 @@ static int admv1014_init(struct admv1014_state *st)
> chip_id = FIELD_GET(ADMV1014_CHIP_ID_MSK, chip_id);
> if (chip_id != ADMV1014_CHIP_ID) {
> dev_err(&spi->dev, "Invalid Chip ID.\n");
> - ret = -EINVAL;
> - return ret;
> + return -EINVAL;
> }
>
> ret = __admv1014_spi_update_bits(st, ADMV1014_REG_QUAD,
next prev parent reply other threads:[~2022-08-19 17:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-19 10:41 [PATCH] iio: frequency: admv1014: return -EINVAL directly Antoniu Miclaus
2022-08-19 17:08 ` Jonathan Cameron [this message]
2022-08-20 15:56 ` Andy Shevchenko
2022-08-21 16:29 ` Jonathan Cameron
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=20220819180856.5a1d4e5a@jic23-huawei \
--to=jic23@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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