Skip to content

Commit

Permalink
SUNRPC: Fix the return value of rpc_run_bc_task()
Browse files Browse the repository at this point in the history
Currently rpc_run_bc_task() will return NULL if the task allocation failed.
However the only caller is bc_send, which assumes that the return value
will be an ERR_PTR.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Mar 22, 2010
1 parent c9acb42 commit ff0901f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req,
task = rpc_new_task(&task_setup_data);
if (!task) {
xprt_free_bc_request(req);
task = ERR_PTR(-ENOMEM);
goto out;
}
task->tk_rqstp = req;
Expand Down

0 comments on commit ff0901f

Please sign in to comment.