diff mbox

svcauth_gss: fix error return code in rsc_parse()

Message ID A360F954C61C69449463B0606663711259EE5457@CDCEXMBX01.tw.trendnet.org (mailing list archive)
State New, archived
Headers show

Commit Message

yongjun_wei@trendmicro.com.cn April 18, 2013, 3:01 a.m. UTC
Sorry, my mail server got something wrong, those mail with title
'[PATCH] svcauth_gss: fix error return code in rsc_parse()' are all the same, just
dup sent by the mail server.

Regards,

-----Original Message-----
From: Wei Yongjun [mailto:weiyj.lk@gmail.com] 

Sent: 2013?4?18? 10:49
To: bfields@fieldses.org; Trond.Myklebust@netapp.com; ebiederm@xmission.com; skinsbursky@parallels.com; jlayton@redhat.com; simo@redhat.com
Cc: Yongjun Wei (RD-CN); linux-nfs@vger.kernel.org
Subject: [PATCH] svcauth_gss: fix error return code in rsc_parse()

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>


Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

---
 net/sunrpc/auth_gss/svcauth_gss.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)



<table class="TM_EMAIL_NOTICE"><tr><td><pre>
TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential 
and may be subject to copyright or other intellectual property protection. 
If you are not the intended recipient, you are not authorized to use or 
disclose this information, and we request that you notify us by reply mail or
telephone and delete the original message from your mail system.
</pre></td></tr></table>
diff mbox

Patch

diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index 5ead605..c2156fb 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -505,8 +505,10 @@  static int rsc_parse(struct cache_detail *cd,
 		len = qword_get(&mesg, buf, mlen);
 		if (len > 0) {
 			rsci.cred.cr_principal = kstrdup(buf, GFP_KERNEL);
-			if (!rsci.cred.cr_principal)
+			if (!rsci.cred.cr_principal) {
+				status = -ENOMEM;
 				goto out;
+			}
 		}
 
 	}