From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
To: Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: [PATCH 2/2] edac: pnd2_edac: remove useless variable assignment
Date: Thu, 22 Jun 2017 14:30:10 -0500 [thread overview]
Message-ID: <20170622193010.GA14399@embeddedgus> (raw)
In-Reply-To: <20170622192646.GA14339@embeddedgus>
Value assigned to variable _ret_ at line 176 is overwritten
a few lines below before it can be used. This makes such
variable assignment useless.
Addresses-Coverity-ID: 1403730
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
drivers/edac/pnd2_edac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c
index c51ec73..d1de53e 100644
--- a/drivers/edac/pnd2_edac.c
+++ b/drivers/edac/pnd2_edac.c
@@ -173,7 +173,7 @@ static int apl_rd_reg(int port, int off, int op, void *data, size_t sz, char *na
edac_dbg(2, "Read %s port=%x off=%x op=%x\n", name, port, off, op);
switch (sz) {
case 8:
- ret = sbi_send(port, off + 4, op, (u32 *)(data + 4));
+ sbi_send(port, off + 4, op, (u32 *)(data + 4));
/* fall through */
case 4:
ret = sbi_send(port, off, op, (u32 *)data);
--
2.5.0
next prev parent reply other threads:[~2017-06-22 19:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 19:26 [PATCH 1/2] edac: pnd2_edac: add code comment for clarification Gustavo A. R. Silva
2017-06-22 19:30 ` Gustavo A. R. Silva [this message]
2017-06-22 21:07 ` [PATCH 2/2] edac: pnd2_edac: remove useless variable assignment Borislav Petkov
2017-06-22 21:43 ` Gustavo A. R. Silva
2017-06-22 22:05 ` [PATCH] edac: pnd2_edac: add code comment for clarification and update " Gustavo A. R. Silva
2017-06-23 7:53 ` Borislav Petkov
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=20170622193010.GA14399@embeddedgus \
--to=garsilva@embeddedor.com \
--cc=bp@alien8.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=tony.luck@intel.com \
/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).