aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/auth_gss/auth_gss.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 0fe35664c687..bc512fff8a41 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -329,16 +329,16 @@ gss_alloc_msg(struct gss_auth *gss_auth, uid_t uid)
329 struct gss_upcall_msg *gss_msg; 329 struct gss_upcall_msg *gss_msg;
330 330
331 gss_msg = kzalloc(sizeof(*gss_msg), GFP_NOFS); 331 gss_msg = kzalloc(sizeof(*gss_msg), GFP_NOFS);
332 if (gss_msg != NULL) { 332 if (gss_msg == NULL)
333 INIT_LIST_HEAD(&gss_msg->list); 333 return ERR_PTR(-ENOMEM);
334 rpc_init_wait_queue(&gss_msg->rpc_waitqueue, "RPCSEC_GSS upcall waitq"); 334 INIT_LIST_HEAD(&gss_msg->list);
335 init_waitqueue_head(&gss_msg->waitqueue); 335 rpc_init_wait_queue(&gss_msg->rpc_waitqueue, "RPCSEC_GSS upcall waitq");
336 atomic_set(&gss_msg->count, 1); 336 init_waitqueue_head(&gss_msg->waitqueue);
337 gss_msg->msg.data = &gss_msg->uid; 337 atomic_set(&gss_msg->count, 1);
338 gss_msg->msg.len = sizeof(gss_msg->uid); 338 gss_msg->msg.data = &gss_msg->uid;
339 gss_msg->uid = uid; 339 gss_msg->msg.len = sizeof(gss_msg->uid);
340 gss_msg->auth = gss_auth; 340 gss_msg->uid = uid;
341 } 341 gss_msg->auth = gss_auth;
342 return gss_msg; 342 return gss_msg;
343} 343}
344 344
@@ -355,8 +355,8 @@ gss_setup_upcall(struct rpc_clnt *clnt, struct gss_auth *gss_auth, struct rpc_cr
355 uid = 0; 355 uid = 0;
356 356
357 gss_new = gss_alloc_msg(gss_auth, uid); 357 gss_new = gss_alloc_msg(gss_auth, uid);
358 if (gss_new == NULL) 358 if (IS_ERR(gss_new))
359 return ERR_PTR(-ENOMEM); 359 return gss_new;
360 gss_msg = gss_add_msg(gss_auth, gss_new); 360 gss_msg = gss_add_msg(gss_auth, gss_new);
361 if (gss_msg == gss_new) { 361 if (gss_msg == gss_new) {
362 int res = rpc_queue_upcall(gss_auth->dentry->d_inode, &gss_new->msg); 362 int res = rpc_queue_upcall(gss_auth->dentry->d_inode, &gss_new->msg);