kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin King <colin.king@canonical.com>
To: Paul Cercueil <paul@crapouillou.net>, linux-i2c@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] i2c: jz4780: remove redundant assignment to variable i
Date: Wed, 10 Jun 2020 12:59:01 +0000	[thread overview]
Message-ID: <20200610125901.1134204-1-colin.king@canonical.com> (raw)

From: Colin Ian King <colin.king@canonical.com>

The variable i is being initialized with a value that is
never read and it is being updated later with a new value. The
initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/i2c/busses/i2c-jz4780.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c
index ba831df6661e..fcdabfa3b5ee 100644
--- a/drivers/i2c/busses/i2c-jz4780.c
+++ b/drivers/i2c/busses/i2c-jz4780.c
@@ -691,7 +691,7 @@ static inline int jz4780_i2c_xfer_write(struct jz4780_i2c *i2c,
 static int jz4780_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msg,
 			   int count)
 {
-	int i = -EIO;
+	int i;
 	int ret = 0;
 	struct jz4780_i2c *i2c = adap->algo_data;
 
-- 
2.27.0.rc0

             reply	other threads:[~2020-06-10 12:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 12:59 Colin King [this message]
2020-07-04  6:32 ` [PATCH] i2c: jz4780: remove redundant assignment to variable i Wolfram Sang
2020-07-06 23:52   ` Paul Cercueil

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=20200610125901.1134204-1-colin.king@canonical.com \
    --to=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@crapouillou.net \
    /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;
as well as URLs for NNTP newsgroup(s).