Skip to content

Commit efe57fd

Browse files
sherllyTrond Myklebust
authored andcommitted
SUNRPC: Remove unreachable error condition
rpc_clnt_test_and_add_xprt() invokes rpc_call_null_helper(), which return the value of rpc_run_task() to "task". Since rpc_run_task() is impossible to return an ERR pointer, there is no need to add the IS_ERR() condition on "task" here. So we need to remove it. Fixes: 7f55489 ("SUNRPC: Allow addition of new transports to a struct rpc_clnt") Signed-off-by: Xiyu Yang <[email protected]> Signed-off-by: Xin Tan <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 7648f93 commit efe57fd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/sunrpc/clnt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2808,8 +2808,7 @@ int rpc_clnt_test_and_add_xprt(struct rpc_clnt *clnt,
28082808
task = rpc_call_null_helper(clnt, xprt, NULL,
28092809
RPC_TASK_SOFT|RPC_TASK_SOFTCONN|RPC_TASK_ASYNC|RPC_TASK_NULLCREDS,
28102810
&rpc_cb_add_xprt_call_ops, data);
2811-
if (IS_ERR(task))
2812-
return PTR_ERR(task);
2811+
28132812
rpc_put_task(task);
28142813
success:
28152814
return 1;

0 commit comments

Comments
 (0)