Skip to content

Commit

Permalink
fpga: Fix dead store fpga-mgr.c
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
  • Loading branch information
Tom Rix authored and Moritz Fischer committed Jun 19, 2020
1 parent e1d9ec3 commit 88aaab9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/fpga/fpga-mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 88aaab9

Please sign in to comment.