mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][next] regulator: core: Remove redundant assignment to variable possible_uV
@ 2024-02-16 13:49 Colin Ian King
  2024-02-21  0:51 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-02-16 13:49 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown; +Cc: kernel-janitors, linux-kernel

The variable possible_uV being assigned a value that is never read, the
control flow via the following goto statement takes a path where the
variable is not accessed. The assignment is redundant and can be removed.

Cleans up clang scan build warning:
drivers/regulator/core.c:3935:3: warning: Value stored to 'possible_uV'
is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/regulator/core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index a968dabb48f5..17c98c5fa45f 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3932,7 +3932,6 @@ static int regulator_get_optimal_voltage(struct regulator_dev *rdev,
 		if (ret < 0)
 			return ret;
 
-		possible_uV = desired_min_uV;
 		done = true;
 
 		goto finish;
-- 
2.39.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-21  0:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-16 13:49 [PATCH][next] regulator: core: Remove redundant assignment to variable possible_uV Colin Ian King
2024-02-21  0:51 ` Mark Brown

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®