Skip to contentSkip to conversation

w1: remove redundant initialization to variable result

PATCH Applied Colin King 2 participants 2 messages Jul 21, 2021 – May 8, 2023

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 w1: remove redundant initialization to variable result

From: Colin Ian King <[email protected]>

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")

---
 drivers/w1/w1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/w1/w1.c +1 -1
index f2ae2e563dc5..3c7817bd6744 100644
@@ -501,7 +501,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;
Signature · 1 line
2.31.1