From: Antoniu Miclaus <antoniu.miclaus@analog.com>
To: "Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] iio: adc: ad7298: remove redundant else after return
Date: Fri, 20 Feb 2026 15:33:30 +0200 [thread overview]
Message-ID: <20260220133337.85216-2-antoniu.miclaus@analog.com> (raw)
In-Reply-To: <20260220133337.85216-1-antoniu.miclaus@analog.com>
The else returning the internal reference voltage in
ad7298_get_ref_voltage() is unnecessary since the if block for the
external regulator already returns.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/adc/ad7298.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad7298.c b/drivers/iio/adc/ad7298.c
index 7c0538ea15c8..e775d84da333 100644
--- a/drivers/iio/adc/ad7298.c
+++ b/drivers/iio/adc/ad7298.c
@@ -216,9 +216,9 @@ static int ad7298_get_ref_voltage(struct ad7298_state *st)
return vref;
return vref / 1000;
- } else {
- return AD7298_INTREF_mV;
}
+
+ return AD7298_INTREF_mV;
}
static int ad7298_read_raw(struct iio_dev *indio_dev,
--
2.43.0
next prev parent reply other threads:[~2026-02-20 13:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 13:33 [PATCH 0/5] iio: " Antoniu Miclaus
2026-02-20 13:33 ` Antoniu Miclaus [this message]
2026-02-20 13:33 ` [PATCH 2/5] iio: adc: ad7606: " Antoniu Miclaus
2026-02-20 13:33 ` [PATCH 3/5] iio: dac: ad5592r-base: " Antoniu Miclaus
2026-02-20 13:33 ` [PATCH 4/5] iio: dac: ad5758: " Antoniu Miclaus
2026-02-20 13:33 ` [PATCH 5/5] iio: filter: admv8818: " Antoniu Miclaus
2026-02-20 14:14 ` Andy Shevchenko
2026-02-20 14:13 ` [PATCH 0/5] iio: " Andy Shevchenko
2026-02-20 14:16 ` Andy Shevchenko
2026-02-22 16:43 ` 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=20260220133337.85216-2-antoniu.miclaus@analog.com \
--to=antoniu.miclaus@analog.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.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®