Skip to content

Commit

Permalink
RDMA/cma: Remove redundant check in cma_add_one
Browse files Browse the repository at this point in the history
Remove redundant check of node_guid in cma_add_one().

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Krishna Kumar authored and Roland Dreier committed Nov 29, 2006
1 parent e82153b commit e402227
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/infiniband/core/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -2122,8 +2122,6 @@ static void cma_add_one(struct ib_device *device)

cma_dev->device = device;
cma_dev->node_guid = device->node_guid;
if (!cma_dev->node_guid)
goto err;

init_completion(&cma_dev->comp);
atomic_set(&cma_dev->refcount, 1);
Expand All @@ -2135,9 +2133,6 @@ static void cma_add_one(struct ib_device *device)
list_for_each_entry(id_priv, &listen_any_list, list)
cma_listen_on_dev(id_priv, cma_dev);
mutex_unlock(&lock);
return;
err:
kfree(cma_dev);
}

static int cma_remove_id_dev(struct rdma_id_private *id_priv)
Expand Down

0 comments on commit e402227

Please sign in to comment.