From: trix@redhat.com
To: mdf@kernel.org
Cc: linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org,
Tom Rix <trix@redhat.com>
Subject: [PATCH v2 1/2] fpga: Fix dead store fpga-mgr.c
Date: Mon, 8 Jun 2020 05:54:45 -0700 [thread overview]
Message-ID: <20200608125446.23311-2-trix@redhat.com> (raw)
In-Reply-To: <20200608125446.23311-1-trix@redhat.com>
From: Tom Rix <trix@redhat.com>
Using clang's scan-build/view this issue was flagged in fpga-mgr.c
drivers/fpga/fpga-mgr.c:585:3: warning: Value stored to 'ret' is never read [deadcode.DeadStores]
ret = id;
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/fpga/fpga-mgr.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
index e05104f5e40c..f38bab01432e 100644
--- a/drivers/fpga/fpga-mgr.c
+++ b/drivers/fpga/fpga-mgr.c
@@ -581,10 +581,8 @@ struct fpga_manager *fpga_mgr_create(struct device *dev, const char *name,
return NULL;
id = ida_simple_get(&fpga_mgr_ida, 0, 0, GFP_KERNEL);
- if (id < 0) {
- ret = id;
+ if (id < 0)
goto error_kfree;
- }
mutex_init(&mgr->ref_mutex);
--
2.18.2
next prev parent reply other threads:[~2020-06-08 12:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-08 12:54 [PATCH v2 0/2] fpga: Fix dead store trix
2020-06-08 12:54 ` trix [this message]
2020-06-19 1:39 ` [PATCH v2 1/2] fpga: Fix dead store fpga-mgr.c Moritz Fischer
2020-06-08 12:54 ` [PATCH v2 2/2] fpga: Fix dead store in fpga-bridge.c trix
2020-06-19 1:39 ` Moritz Fischer
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=20200608125446.23311-2-trix@redhat.com \
--to=trix@redhat.com \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
/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).