From: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
gregkh@linuxfoundation.org, marcelo.schmitt1@gmail.com,
gshahrouzi@gmail.com, hridesh699@gmail.com,
akhilesh@ee.iitb.ac.in
Cc: linux-iio@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, akhileshpatilvnit@gmail.com,
skhan@linuxfoundation.org
Subject: [PATCH] staging: iio: ad5933: Fix implicit fall-through in switch()
Date: Mon, 28 Jul 2025 15:29:28 +0530 [thread overview]
Message-ID: <aIdKAJVnskdAVUMi@bhairav-test.ee.iitb.ac.in> (raw)
Add default case in switch() codeblock in ad5933_read_raw().
Convert implicit error return due to switch fallthrough to explicit return
to make intent clear. Follow kernel switch fall-thorugh guidelines at
Documentation/process/deprecated.rst
Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
---
Checked build for 6.16.0 kernel with ad5933
---
drivers/staging/iio/impedance-analyzer/ad5933.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
index 85a4223295cd..6547a259b8a0 100644
--- a/drivers/staging/iio/impedance-analyzer/ad5933.c
+++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
@@ -533,9 +533,10 @@ static int ad5933_read_raw(struct iio_dev *indio_dev,
*val = 1000;
*val2 = 5;
return IIO_VAL_FRACTIONAL_LOG2;
+ default:
+ return -EINVAL;
}
- return -EINVAL;
out:
iio_device_release_direct(indio_dev);
return ret;
--
2.34.1
next reply other threads:[~2025-07-28 9:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-28 9:59 Akhilesh Patil [this message]
2025-07-28 10:39 ` Greg KH
2025-07-28 14:02 ` Akhilesh Patil
2025-07-28 14:23 ` Greg KH
2025-08-05 21:16 ` Andy Shevchenko
2025-08-08 9:57 ` Akhilesh Patil
2025-08-08 12:47 ` Andy Shevchenko
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=aIdKAJVnskdAVUMi@bhairav-test.ee.iitb.ac.in \
--to=akhilesh@ee.iitb.ac.in \
--cc=Michael.Hennerich@analog.com \
--cc=akhileshpatilvnit@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=gshahrouzi@gmail.com \
--cc=hridesh699@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=marcelo.schmitt1@gmail.com \
--cc=nuno.sa@analog.com \
--cc=skhan@linuxfoundation.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
all inboxes | Powered by JetHome®