Skip to contentSkip to conversation

ibacm: properly check return from ibv_open_device

PATCH In review Ira Weiny 2 participants 2 messages Mar 21, 2014 – Mar 28, 2014 1 message not in the archive InfiniBand

lore
Share & tools
lore

Ira Weiny

author
#0 lore raw

PATCH 1/1 ibacm: properly check return from ibv_open_device

---
 src/acme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/acme.c +1 -1
index b122e58..d3d6303 100644
@@ -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;
Signature · 6 lines
1.7.12

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html