Skip to content

Commit

Permalink
cifs: fix error handling when cifscreds key payload is an error
Browse files Browse the repository at this point in the history
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
  • Loading branch information
Jeff Layton authored and Steve French committed Feb 8, 2012
1 parent 98e9685 commit 4edc53c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -2125,7 +2125,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
down_read(&key->sem);
upayload = key->payload.data;
if (IS_ERR_OR_NULL(upayload)) {
rc = PTR_ERR(key);
rc = upayload ? PTR_ERR(upayload) : -EINVAL;
goto out_key_put;
}

Expand Down

0 comments on commit 4edc53c

Please sign in to comment.