diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/svc.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 349c98f9818b..537add5309cc 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -503,13 +503,15 @@ svc_create_pooled(struct svc_program *prog, unsigned int bufsize, | |||
503 | unsigned int npools = svc_pool_map_get(); | 503 | unsigned int npools = svc_pool_map_get(); |
504 | 504 | ||
505 | serv = __svc_create(prog, bufsize, npools, shutdown); | 505 | serv = __svc_create(prog, bufsize, npools, shutdown); |
506 | if (!serv) | ||
507 | goto out_err; | ||
506 | 508 | ||
507 | if (serv != NULL) { | 509 | serv->sv_function = func; |
508 | serv->sv_function = func; | 510 | serv->sv_module = mod; |
509 | serv->sv_module = mod; | ||
510 | } | ||
511 | |||
512 | return serv; | 511 | return serv; |
512 | out_err: | ||
513 | svc_pool_map_put(); | ||
514 | return NULL; | ||
513 | } | 515 | } |
514 | EXPORT_SYMBOL_GPL(svc_create_pooled); | 516 | EXPORT_SYMBOL_GPL(svc_create_pooled); |
515 | 517 | ||