[PATCH] net/sunrpc/xprtrdma: fix svc_rdma_create out of memoryerror path

From: Marcin Slusarz
Date: Sun May 11 2008 - 16:08:06 EST


ERR_PTR takes negative errno as a parameter

Signed-off-by: Marcin Slusarz <marcin.slusarz@xxxxxxxxx>
Cc: Tom Tucker <tom@xxxxxxxxxxxxxxxxxxxxx>
Cc: J. Bruce Fields <bfields@xxxxxxxxxxxxxx>
---
compile tested only
---
net/sunrpc/xprtrdma/svc_rdma_transport.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -661,7 +661,7 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,

cma_xprt = rdma_create_xprt(serv, 1);
if (!cma_xprt)
- return ERR_PTR(ENOMEM);
+ return ERR_PTR(-ENOMEM);
xprt = &cma_xprt->sc_xprt;

listen_id = rdma_create_id(rdma_listen_handler, cma_xprt, RDMA_PS_TCP);
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/