headers: remove sched.h from interrupt.h
[safe/jmp/linux-2.6] / net / sunrpc / xprtrdma / svc_rdma_transport.c
index 5151f9f..3fa5751 100644 (file)
@@ -42,6 +42,7 @@
 #include <linux/sunrpc/svc_xprt.h>
 #include <linux/sunrpc/debug.h>
 #include <linux/sunrpc/rpc_rdma.h>
+#include <linux/sched.h>
 #include <linux/spinlock.h>
 #include <rdma/ib_verbs.h>
 #include <rdma/rdma_cm.h>
@@ -730,12 +731,12 @@ static struct svc_rdma_fastreg_mr *rdma_alloc_frmr(struct svcxprt_rdma *xprt)
                goto err;
 
        mr = ib_alloc_fast_reg_mr(xprt->sc_pd, RPCSVC_MAXPAGES);
-       if (!mr)
+       if (IS_ERR(mr))
                goto err_free_frmr;
 
        pl = ib_alloc_fast_reg_page_list(xprt->sc_cm_id->device,
                                         RPCSVC_MAXPAGES);
-       if (!pl)
+       if (IS_ERR(pl))
                goto err_free_mr;
 
        frmr->mr = mr;