]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
ibacm: properly check return from ibv_open_device
authorIra Weiny <ira.weiny@intel.com>
Fri, 21 Mar 2014 14:07:03 +0000 (10:07 -0400)
committerIra Weiny <ira.weiny@intel.com>
Fri, 21 Mar 2014 14:07:03 +0000 (10:07 -0400)
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
src/acme.c

index b122e58e7d3f563fa8bb5150849653dcb51eea84..d3d63039ede524277b185ce56fdd1f4c0296b328 100644 (file)
@@ -353,7 +353,7 @@ static int open_verbs(void)
 
        for (i = 0; i < dev_cnt; i++) {
                verbs[i] = ibv_open_device(dev_array[i]);
-               if (!verbs) {
+               if (!verbs[i]) {
                        printf("ibv_open_device - failed to open device\n");
                        ret = -1;
                        goto err2;