mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Matti Vaittinen <mazziesaccount@gmail.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] iio: pressure: rohm-bm1390: Remove redundant if statement
Date: Thu, 10 Oct 2024 19:07:00 +0100	[thread overview]
Message-ID: <20241010190700.5466107f@jic23-huawei> (raw)
In-Reply-To: <20241010170835.772764-1-colin.i.king@gmail.com>

On Thu, 10 Oct 2024 18:08:35 +0100
Colin Ian King <colin.i.king@gmail.com> wrote:

> From: Colin Ian King <colin.i.king@intel.com>
> 
> There is a check on non-zero ret that is redundant because the
> same check is being performed in a previous if statement and
> also before that. The check is not required, remove it.
> 
> Signed-off-by: Colin Ian King <colin.i.king@intel.com>
Applied.  Thanks,

Jonathan

> ---
>  drivers/iio/pressure/rohm-bm1390.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/iio/pressure/rohm-bm1390.c b/drivers/iio/pressure/rohm-bm1390.c
> index ccaa07a569c9..f24d9f927681 100644
> --- a/drivers/iio/pressure/rohm-bm1390.c
> +++ b/drivers/iio/pressure/rohm-bm1390.c
> @@ -410,23 +410,20 @@ static int __bm1390_fifo_flush(struct iio_dev *idev, unsigned int samples,
>  	if (ret)
>  		return ret;
>  
>  	if (test_bit(BM1390_CHAN_TEMP, idev->active_scan_mask)) {
>  		ret = regmap_bulk_read(data->regmap, BM1390_REG_TEMP_HI, &temp,
>  				       sizeof(temp));
>  		if (ret)
>  			return ret;
>  	}
>  
> -	if (ret)
> -		return ret;
> -
>  	for (i = 0; i < smp_lvl; i++) {
>  		buffer[i].temp = temp;
>  		iio_push_to_buffers(idev, &buffer[i]);
>  	}
>  
>  	return smp_lvl;
>  }
>  
>  static int bm1390_fifo_flush(struct iio_dev *idev, unsigned int samples)
>  {


  reply	other threads:[~2024-10-10 18:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-10 17:08 Colin Ian King
2024-10-10 18:07 ` Jonathan Cameron [this message]
2024-10-11  9:38 ` Matti Vaittinen

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=20241010190700.5466107f@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=colin.i.king@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mazziesaccount@gmail.com \
    /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

all inboxes | Powered by JetHome®