diff options
author | Nathan Chancellor <[email protected]> | 2020-08-17 23:49:25 -0700 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2020-08-21 17:09:11 -0600 |
commit | 17bc10300c69bd51b82983cdadafa0a7791f074e (patch) | |
tree | 664152b89d4e4e6ca9c1b6379ca522a5704867a6 /include/linux/fpga/fpga-mgr.h | |
parent | 2de791ab4918969d8108f15238a701968375f235 (diff) |
block/rnbd: Ensure err is always initialized in process_rdma
Clang warns:
drivers/block/rnbd/rnbd-srv.c:150:6: warning: variable 'err' is used
uninitialized whenever 'if' condition is true
[-Wsometimes-uninitialized]
if (IS_ERR(bio)) {
^~~~~~~~~~~
drivers/block/rnbd/rnbd-srv.c:177:9: note: uninitialized use occurs here
return err;
^~~
drivers/block/rnbd/rnbd-srv.c:150:2: note: remove the 'if' if its
condition is always false
if (IS_ERR(bio)) {
^~~~~~~~~~~~~~~~~~
drivers/block/rnbd/rnbd-srv.c:126:9: note: initialize the variable 'err'
to silence this warning
int err;
^
= 0
1 warning generated.
err is indeed uninitialized when this statement is taken. Ensure that it
is assigned the error value of bio before jumping to the error handling
label.
Fixes: 735d77d4fd28 ("rnbd: remove rnbd_dev_submit_io")
Reported-by: Brooke Basile <[email protected]>
Signed-off-by: Nathan Chancellor <[email protected]>
Acked-by: Jack Wang <[email protected]>
Link: https://github.com/ClangBuiltLinux/linux/issues/1134
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions