Commit 4f3ed837 authored by Dan Carpenter's avatar Dan Carpenter Committed by Trond Myklebust
Browse files

SUNRPC: Add an IS_ERR() check back to where it was



This IS_ERR() check was deleted during in a cleanup because, at the time,
the rpcb_call_async() function could not return an error pointer.  That
changed in commit 25cf32ad ("SUNRPC: Handle allocation failure in
rpc_new_task()") and now it can return an error pointer.  Put the check
back.

A related revert was done in commit 13bd9014 ("Revert "SUNRPC:
Remove unreachable error condition"").

Fixes: 037e910b ("SUNRPC: Remove unreachable error condition in rpcb_getport_async()")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 6bd1a77d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -769,6 +769,10 @@ void rpcb_getport_async(struct rpc_task *task)

	child = rpcb_call_async(rpcb_clnt, map, proc);
	rpc_release_client(rpcb_clnt);
	if (IS_ERR(child)) {
		/* rpcb_map_release() has freed the arguments */
		return;
	}

	xprt->stat.bind_count++;
	rpc_put_task(child);