archive mirror
 help / color / mirror / Atom feed
From: Colin King <>
To: Evgeniy Polyakov <>
Subject: [PATCH] w1: remove redundant initialization to variable result
Date: Wed, 21 Jul 2021 11:34:51 +0100	[thread overview]
Message-ID: <> (raw)

From: Colin Ian King <>

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 <>
 drivers/w1/w1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index f2ae2e563dc5..3c7817bd6744 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -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;

                 reply	other threads:[~2021-07-21 10:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \
    --subject='Re: [PATCH] w1: remove redundant initialization to variable result' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox