]> git.openfabrics.org - ~shefty/libibverbs.git/commitdiff
Refresh of xrcd
authorSean Hefty <sean.hefty@intel.com>
Wed, 26 Sep 2012 17:02:44 +0000 (10:02 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 26 Sep 2012 17:02:44 +0000 (10:02 -0700)
include/infiniband/driver.h
include/infiniband/verbs.h

index a85012fe14b6d6995d20840e8e5ef9799bc2a50e..cdd917a02641cf2957acb98debc47e6b373f2eff 100644 (file)
@@ -54,7 +54,7 @@
 #define IBV_DEVICE_LIBRARY_EXTENSION rdmav2
 
 enum verbs_xrcd_mask {
-       VERBS_XRCD_HANDLE               = 1 << 0,
+       VERBS_XRCD_HANDLE       = 1 << 0,
        VERBS_XRCD_RESERVED     = 1 << 1
 };
 
index ab26f2a2cfb7127a8b525cadec7d7de54894baac..08750e7835923ce3da8ea49fd49678bb23856269 100644 (file)
@@ -882,7 +882,11 @@ static inline struct ibv_xrcd *
 ibv_open_xrcd(struct ibv_context *context, int fd, int oflags)
 {
        struct verbs_context *vctx = verbs_get_ctx_op(context, open_xrcd);
-       return vctx ? vctx->open_xrcd(context, fd, oflags) : NULL;
+       if (!vctx) {
+               errno = ENOSYS;
+               return NULL;
+       }
+       return vctx->open_xrcd(context, fd, oflags);
 }
 
 /**