diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-02-07 12:30:51 +0100 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-02-08 05:25:26 +0100 |
commit | 4edc53c1f8cdd99d349165d6c61c45aa4e8e2564 (patch) | |
tree | 3df7be26aa431ff8cc884930b848e36f2d1b26b5 /fs/cifs | |
parent | Merge tag 'fbdev-fixes-for-3.3-1' of git://github.com/schandinat/linux-2.6 (diff) | |
download | linux-4edc53c1f8cdd99d349165d6c61c45aa4e8e2564.tar.xz linux-4edc53c1f8cdd99d349165d6c61c45aa4e8e2564.zip |
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>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 9c288653e6d6..940189bd6490 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -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; } |