diff options
-rw-r--r-- | net/rds/ib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/rds/ib.c b/net/rds/ib.c index b4c8b0022fee..ba2dffeff608 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c | |||
@@ -338,7 +338,8 @@ static int rds_ib_laddr_check(__be32 addr) | |||
338 | ret = rdma_bind_addr(cm_id, (struct sockaddr *)&sin); | 338 | ret = rdma_bind_addr(cm_id, (struct sockaddr *)&sin); |
339 | /* due to this, we will claim to support iWARP devices unless we | 339 | /* due to this, we will claim to support iWARP devices unless we |
340 | check node_type. */ | 340 | check node_type. */ |
341 | if (ret || cm_id->device->node_type != RDMA_NODE_IB_CA) | 341 | if (ret || !cm_id->device || |
342 | cm_id->device->node_type != RDMA_NODE_IB_CA) | ||
342 | ret = -EADDRNOTAVAIL; | 343 | ret = -EADDRNOTAVAIL; |
343 | 344 | ||
344 | rdsdebug("addr %pI4 ret %d node type %d\n", | 345 | rdsdebug("addr %pI4 ret %d node type %d\n", |