diff options
author | Samuel Cabrero <[email protected]> | 2020-12-15 17:46:56 +0100 |
---|---|---|
committer | Steve French <[email protected]> | 2020-12-15 15:13:47 -0600 |
commit | 09a8361e3b681ef6b56cc56f7b2905b4455d6774 (patch) | |
tree | 3e74c1404183a0b5cf69c59bce8daad477224ee3 /lib/test_overflow.c | |
parent | dd538034f84fa4ea670420aac19adcceef45d057 (diff) |
cifs: Fix some error pointers handling detected by static checker
* extract_hostname() and extract_sharename() never return NULL, so
use IS_ERR() instead of IS_ERR_OR_NULL() in cifs_find_swn_reg(). If
any of these functions return an error, then return an error pointer
instead of NULL.
* Change cifs_find_swn_reg() function to always return a valid pointer
or an error pointer, instead of returning NULL if the registration
is not found.
* Finally update cifs_find_swn_reg() callers to check for -EEXIST
instead of NULL.
* In cifs_get_swn_reg() the swnreg idr mutex was not unlocked in the
error path of cifs_find_swn_reg() call.
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Samuel Cabrero <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Steve French <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions