All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cifs: fix error handling when cifscreds key payload is an error
@ 2012-01-20 13:04 Jeff Layton
       [not found] ` <1327064677-15896-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2012-01-20 13:04 UTC (permalink / raw)
  To: smfrench-Re5JQEeQqe8AvxtiuMwx3w
  Cc: dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA

Reported-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 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 986709a..aa687c8 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;
 	}
 
-- 
1.7.7.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-25  7:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-20 13:04 [PATCH] cifs: fix error handling when cifscreds key payload is an error Jeff Layton
     [not found] ` <1327064677-15896-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-01-20 19:44   ` Steve French
     [not found]     ` <CAH2r5mtTtYzj5MJXc5pu3L+cKO1XKrrcx6=gr8W_874sYPzfnw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-25  7:32       ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.