From: Ira Weiny Date: Fri, 21 Mar 2014 14:07:03 +0000 (-0400) Subject: ibacm: properly check return from ibv_open_device X-Git-Tag: v1.0.9~5 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=7027a3f4d9fdc879c4698d8dc7d54e454d277bc9;p=~shefty%2Fibacm.git ibacm: properly check return from ibv_open_device Signed-off-by: Ira Weiny --- diff --git a/src/acme.c b/src/acme.c index b122e58..d3d6303 100644 --- a/src/acme.c +++ b/src/acme.c @@ -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;