From: Jeff Layton Date: Tue, 7 Feb 2012 11:30:51 +0000 (-0500) Subject: cifs: fix error handling when cifscreds key payload is an error X-Git-Tag: v3.3-rc4~23^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4edc53c1f8cdd99d349165d6c61c45aa4e8e2564;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git cifs: fix error handling when cifscreds key payload is an error Reported-by: Dan Carpenter Signed-off-by: Jeff Layton Signed-off-by: Steve French --- 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; }