]> Git Repo - linux.git/commitdiff
fpga: Fix dead store fpga-mgr.c
authorTom Rix <[email protected]>
Mon, 8 Jun 2020 12:54:45 +0000 (05:54 -0700)
committerMoritz Fischer <[email protected]>
Fri, 19 Jun 2020 01:24:16 +0000 (18:24 -0700)
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 <[email protected]>
Signed-off-by: Moritz Fischer <[email protected]>
drivers/fpga/fpga-mgr.c

index e05104f5e40c6a492608644478bdec2ff150c461..f38bab01432e2eae6a1bc7d7bd541837c488bcb0 100644 (file)
@@ -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);
 
This page took 0.044461 seconds and 4 git commands to generate.