summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-02-07 06:30:51 -0500
committerSteve French <smfrench@gmail.com>2012-02-07 22:25:26 -0600
commit4edc53c1f8cdd99d349165d6c61c45aa4e8e2564 (patch)
tree3df7be26aa431ff8cc884930b848e36f2d1b26b5 /fs
parent98e96852480566333f6dacd3223f0be15df34d60 (diff)
downloadtalos-obmc-linux-4edc53c1f8cdd99d349165d6c61c45aa4e8e2564.tar.gz
talos-obmc-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')
-rw-r--r--fs/cifs/connect.c2
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;
}
OpenPOWER on IntegriCloud