From: Gleb Titov <dexield.community@gmail.com>
To: gregkh@linuxfoundation.org
Cc: dan.carpenter@linaro.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
ac100@lists.launchpad.net, dexield.community@gmail.com
Subject: [PATCH v2] staging: nvec: use dev_err_probe() for reset control error
Date: Tue, 1 Dec 2026 14:51:57 +0300 [thread overview]
Message-ID: <20261201115158.1271-1-dexield.community@gmail.com> (raw)
In-Reply-To: <20261130193540.1510-1-dexield.community@gmail.com>
Simplify error handling in tegra_nvec_probe() by using dev_err_probe()
instead of dev_err() when failing to get the reset control. This makes
the code cleaner and properly handles deferred probe errors.
Signed-off-by: Gleb Titov <dexield.community@gmail.com>
---
v2: Add commit message description.
drivers/staging/nvec/nvec.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index b4ad6cb27..7f3b39e7a 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -823,10 +823,9 @@ static int tegra_nvec_probe(struct platform_device *pdev)
"failed to get controller clock\n");
nvec->rst = devm_reset_control_get_exclusive(dev, "i2c");
- if (IS_ERR(nvec->rst)) {
- dev_err(dev, "failed to get controller reset\n");
- return PTR_ERR(nvec->rst);
- }
+ if (IS_ERR(nvec->rst))
+ return dev_err_probe(dev, PTR_ERR(nvec->rst),
+ "failed to get controller reset\n");
nvec->base = base;
nvec->i2c_clk = i2c_clk;
--
2.56.0.windows.4
prev parent reply other threads:[~2026-12-01 11:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 19:35 [PATCH] " Gleb Titov
2026-12-01 5:23 ` Dan Carpenter
2026-12-01 11:51 ` Gleb Titov [this message]
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=20261201115158.1271-1-dexield.community@gmail.com \
--to=dexield.community@gmail.com \
--cc=ac100@lists.launchpad.net \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux-tegra@vger.kernel.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®