aboutsummaryrefslogtreecommitdiffstats
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 23:25:26 -0500
commit4edc53c1f8cdd99d349165d6c61c45aa4e8e2564 (patch)
tree3df7be26aa431ff8cc884930b848e36f2d1b26b5
parent98e96852480566333f6dacd3223f0be15df34d60 (diff)
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>
-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)
2125 down_read(&key->sem); 2125 down_read(&key->sem);
2126 upayload = key->payload.data; 2126 upayload = key->payload.data;
2127 if (IS_ERR_OR_NULL(upayload)) { 2127 if (IS_ERR_OR_NULL(upayload)) {
2128 rc = PTR_ERR(key); 2128 rc = upayload ? PTR_ERR(upayload) : -EINVAL;
2129 goto out_key_put; 2129 goto out_key_put;
2130 } 2130 }
2131 2131