From: Colin Ian King <colin.i.king@gmail.com>
To: Matti Vaittinen <mazziesaccount@gmail.com>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-iio@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][next] iio: pressure: rohm-bm1390: Remove redundant if statement
Date: Thu, 10 Oct 2024 18:08:35 +0100 [thread overview]
Message-ID: <20241010170835.772764-1-colin.i.king@gmail.com> (raw)
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>
---
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)
{
--
2.39.5
next reply other threads:[~2024-10-10 17:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 17:08 Colin Ian King [this message]
2024-10-10 18:07 ` Jonathan Cameron
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=20241010170835.772764-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=jic23@kernel.org \
--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®