From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org, driver-core@lists.linux.dev
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Johan Hovold <johan@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 4/4] regmap: Drop duplicate ret assignment
Date: Tue, 10 Nov 2026 10:37:02 +0100 [thread overview]
Message-ID: <20261110093820.454682-5-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20261110093820.454682-1-andriy.shevchenko@linux.intel.com>
In a one case the ret is assigned at the top of a certain function and
gets reassigned in all cases after that, making the initial assignment
useless. Drop that assignment.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/base/regmap/regmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 1855b5fc76da..b729226e9e3d 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1608,8 +1608,8 @@ static int _regmap_raw_write_impl(struct regmap *map, unsigned int reg,
unsigned long flags;
void *work_val;
void *buf;
- int ret = -ENOTSUPP;
size_t len;
+ int ret;
int i;
/* Check for unwritable or noinc registers in range
--
2.50.1
next prev parent reply other threads:[~2026-11-10 9:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 9:36 [PATCH v1 0/4] regmap: a small set of cleanups Andy Shevchenko
2026-11-10 9:36 ` [PATCH v1 1/4] regmap: Switch to use kmemdup_array() Andy Shevchenko
2026-11-10 9:37 ` [PATCH v1 2/4] regmap: Drop never used devm_regmap_*_free() APIs Andy Shevchenko
2026-11-10 10:19 ` Peng Fan
2026-11-10 9:37 ` [PATCH v1 3/4] regmap: Defer assignments to the later in some cases Andy Shevchenko
2026-11-10 10:20 ` Peng Fan
2026-11-10 9:37 ` Andy Shevchenko [this message]
2026-11-10 10:22 ` [PATCH v1 4/4] regmap: Drop duplicate ret assignment Peng Fan
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=20261110093820.454682-5-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@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®