diff options
author | Roland Dreier <rolandd@cisco.com> | 2010-07-19 13:13:09 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-07-19 13:13:09 -0700 |
commit | 85963e4cbcf11c00b1d27ea0e0fcab8cb3d7a69b (patch) | |
tree | 27674e8ad976d61c6a7301186ef33600d44df03e /drivers/infiniband | |
parent | c1d7356c8572f3fe0445336d8e75914bdcadad59 (diff) | |
download | blackbird-op-linux-85963e4cbcf11c00b1d27ea0e0fcab8cb3d7a69b.tar.gz blackbird-op-linux-85963e4cbcf11c00b1d27ea0e0fcab8cb3d7a69b.zip |
RDMA/cxgb4: Remove unneeded NULL check
The rest of the code seems to assume that ep->com.cm_id can't be NULL,
so remove an unneeded test.
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index b5e676c61096..4185c3b0635b 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -780,11 +780,11 @@ static void connect_reply_upcall(struct c4iw_ep *ep, int status) event.private_data_len = ep->plen; event.private_data = ep->mpa_pkt + sizeof(struct mpa_message); } - if (ep->com.cm_id) { - PDBG("%s ep %p tid %u status %d\n", __func__, ep, - ep->hwtid, status); - ep->com.cm_id->event_handler(ep->com.cm_id, &event); - } + + PDBG("%s ep %p tid %u status %d\n", __func__, ep, + ep->hwtid, status); + ep->com.cm_id->event_handler(ep->com.cm_id, &event); + if (status < 0) { ep->com.cm_id->rem_ref(ep->com.cm_id); ep->com.cm_id = NULL; |