Skip to content

Commit

Permalink
sunrpc: Don't return NULL from rpcb_create
Browse files Browse the repository at this point in the history
> The reason for this is in the future, we may want to support additional
> address family types.  We should, therefore, ensure that every piece of
> code that is sensitive to address families fail in some orderly manner
> to let developers know where a change is needed.

Makes sense. I was under impression, that AF-s other than INET are not
cared about at all :(

Here's a fixed version of the patch.

Log:

Its callers check for ERR_PTR.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Pavel Emelyanov authored and J. Bruce Fields committed Oct 19, 2010
1 parent f10fef3 commit c636b57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sunrpc/rpcb_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static struct rpc_clnt *rpcb_create(char *hostname, struct sockaddr *srvaddr,
((struct sockaddr_in6 *)srvaddr)->sin6_port = htons(RPCBIND_PORT);
break;
default:
return NULL;
return ERR_PTR(-EAFNOSUPPORT);
}

return rpc_create(&args);
Expand Down

0 comments on commit c636b57

Please sign in to comment.