diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-02-07 11:30:51 (GMT) |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-02-08 04:25:26 (GMT) |
commit | 4edc53c1f8cdd99d349165d6c61c45aa4e8e2564 (patch) | |
tree | 3df7be26aa431ff8cc884930b848e36f2d1b26b5 /fs/cifs | |
parent | 98e96852480566333f6dacd3223f0be15df34d60 (diff) | |
download | linux-fsl-qoriq-4edc53c1f8cdd99d349165d6c61c45aa4e8e2564.tar.xz |
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 9c28865..940189b 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; } |