diff options
| author | Tom Rix <[email protected]> | 2020-06-08 12:54:45 +0000 |
|---|---|---|
| committer | Moritz Fischer <[email protected]> | 2020-06-19 01:24:16 +0000 |
| commit | 88aaab9218f87c7c32e5db93554cf110352c3c13 (patch) | |
| tree | fdf1b8d8b84600aca79ab5f73ea9277c364c4983 /drivers/fpga/fpga-mgr.c | |
| parent | fpga: dfl: Use struct_size() in kzalloc() (diff) | |
| download | kernel-88aaab9218f87c7c32e5db93554cf110352c3c13.tar.gz kernel-88aaab9218f87c7c32e5db93554cf110352c3c13.zip | |
fpga: Fix dead store fpga-mgr.c
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]>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
| -rw-r--r-- | drivers/fpga/fpga-mgr.c | 4 |
1 files changed, 1 insertions, 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); |
