aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2010-10-06 13:45:56 +0400
committerJ. Bruce Fields <bfields@redhat.com>2010-10-19 10:48:16 -0400
commitc636b572e00e38855dc7a56a0fa438dd835f39de (patch)
treecd0ce34e01030e61cc0571234b21e0af71e714ff /net
parentf10fef38d2d1605c977346457d0adb0919d0bbe7 (diff)
downloadkernel_samsung_tuna-c636b572e00e38855dc7a56a0fa438dd835f39de.zip
kernel_samsung_tuna-c636b572e00e38855dc7a56a0fa438dd835f39de.tar.gz
kernel_samsung_tuna-c636b572e00e38855dc7a56a0fa438dd835f39de.tar.bz2
sunrpc: Don't return NULL from rpcb_create
> 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>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/rpcb_clnt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 83af38d..1ef2d41 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -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);