X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=net%2Frds%2Fiw.c;h=589935661d667d81b2f6159eb69c237f95329a63;hb=752e4086d0b553125f416ebb1563f5e72febc01c;hp=7826d46baa7038366872ec412d97ecd94eb1d13f;hpb=c1f4246716392ec8693c23cffb969bd73c1b0910;p=firefly-linux-kernel-4.4.55.git diff --git a/net/rds/iw.c b/net/rds/iw.c index 7826d46baa70..589935661d66 100644 --- a/net/rds/iw.c +++ b/net/rds/iw.c @@ -239,7 +239,8 @@ static int rds_iw_laddr_check(__be32 addr) ret = rdma_bind_addr(cm_id, (struct sockaddr *)&sin); /* due to this, we will claim to support IB devices unless we check node_type. */ - if (ret || cm_id->device->node_type != RDMA_NODE_RNIC) + if (ret || !cm_id->device || + cm_id->device->node_type != RDMA_NODE_RNIC) ret = -EADDRNOTAVAIL; rdsdebug("addr %pI4 ret %d node type %d\n",