cifs: fix error handling when cifscreds key payload is an error
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
This commit is contained in:
parent
98e9685248
commit
4edc53c1f8
1 changed files with 1 additions and 1 deletions
|
@ -2125,7 +2125,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
|
||||||
down_read(&key->sem);
|
down_read(&key->sem);
|
||||||
upayload = key->payload.data;
|
upayload = key->payload.data;
|
||||||
if (IS_ERR_OR_NULL(upayload)) {
|
if (IS_ERR_OR_NULL(upayload)) {
|
||||||
rc = PTR_ERR(key);
|
rc = upayload ? PTR_ERR(upayload) : -EINVAL;
|
||||||
goto out_key_put;
|
goto out_key_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue