summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-07-21 11:34:51 +0100
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2023-05-08 08:14:50 +0200
commit9033ff4c0fc65f3f168ee029b7e302a999c152ca (patch)
tree8208e707bd3f70346457c3b33980d54d5d32d2e1
parenta8c4dda94115c4079d3aaa35ba238f2376b6aa53 (diff)
w1: remove redundant initialization to variable result
The variable result is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210721103451.43026-1-colin.king@canonical.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
-rw-r--r--drivers/w1/w1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 0da9f528b6c1..074bbdb67f0e 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -491,7 +491,7 @@ static ssize_t w1_master_attribute_store_remove(struct device *dev,
struct w1_master *md = dev_to_w1_master(dev);
struct w1_reg_num rn;
struct w1_slave *sl;
- ssize_t result = count;
+ ssize_t result;
if (w1_atoreg_num(dev, buf, count, &rn))
return -EINVAL;