From: Raffaele Tranfaglia via B4 Relay <devnull+raffaele.tranfaglia.gmail.com@kernel.org>
To: "Nuno Sá" <nuno.sa@analog.com>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: linux@analog.com, linux-iio@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
Subject: [PATCH] staging: iio: addac: adt7316: use dev_err_probe() for ldac GPIO
Date: Sun, 11 Oct 2026 19:56:22 +0100 [thread overview]
Message-ID: <20261011-adt7316-dev-err-probe-v1-1-27a4a8ac74f3@gmail.com> (raw)
From: Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
Use dev_err_probe() when requesting the ldac GPIO fails. This
avoids logging an error when the GPIO controller is not ready yet
and the request returns -EPROBE_DEFER, and records the deferral
reason. It also simplifies the error path.
Signed-off-by: Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
---
Compile-tested only.
---
drivers/staging/iio/addac/adt7316.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 20f6052cc7fb..8ca6def84584 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -2142,11 +2142,9 @@ int adt7316_probe(struct device *dev, struct adt7316_bus *bus,
chip->ldac_pin = devm_gpiod_get_optional(dev, "adi,ldac",
GPIOD_OUT_LOW);
- if (IS_ERR(chip->ldac_pin)) {
- ret = PTR_ERR(chip->ldac_pin);
- dev_err(dev, "Failed to request ldac GPIO: %d\n", ret);
- return ret;
- }
+ if (IS_ERR(chip->ldac_pin))
+ return dev_err_probe(dev, PTR_ERR(chip->ldac_pin),
+ "Failed to request ldac GPIO\n");
if (!chip->ldac_pin) {
chip->config3 |= ADT7316_DA_EN_VIA_DAC_LDAC;
---
base-commit: a22dc7ebb21a6bd4c8b63bc2c1dd46a24945aae7
change-id: 20261011-adt7316-dev-err-probe-8ffb5e224100
Best regards,
--
Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
next reply other threads:[~2026-10-11 18:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 18:56 Raffaele Tranfaglia via B4 Relay [this message]
2026-10-12 14:35 ` Nuno Sá
2026-10-12 21:27 ` Andy Shevchenko
2026-10-12 21:28 ` Andy Shevchenko
2026-10-13 7:50 ` Joshua Crofts
2026-10-13 8:54 ` 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=20261011-adt7316-dev-err-probe-v1-1-27a4a8ac74f3@gmail.com \
--to=devnull+raffaele.tranfaglia.gmail.com@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux@analog.com \
--cc=nuno.sa@analog.com \
--cc=raffaele.tranfaglia@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®