mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 14:14:24 +08:00
sunrpc: xprtrdma: Use ERR_CAST() to return
Using ERR_CAST() is more reasonable and safer, When it is necessary to convert the type of an error pointer and return it. Signed-off-by: Yan Zhen <yanzhen@vivo.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
2869b3a00e
commit
aeddf8e6c5
@ -369,7 +369,7 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,
|
||||
listen_id = svc_rdma_create_listen_id(net, sa, cma_xprt);
|
||||
if (IS_ERR(listen_id)) {
|
||||
kfree(cma_xprt);
|
||||
return (struct svc_xprt *)listen_id;
|
||||
return ERR_CAST(listen_id);
|
||||
}
|
||||
cma_xprt->sc_cm_id = listen_id;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user