i40iw: Remove NULL check for cm_node->iwdev
authorHenry Orosco <henry.orosco@intel.com>
Thu, 10 Nov 2016 03:32:25 +0000 (21:32 -0600)
committerDoug Ledford <dledford@redhat.com>
Mon, 5 Dec 2016 21:09:36 +0000 (16:09 -0500)
It is not necessary to check cm_node->iwdev in
i40iw_rem_ref_cm_node() as it can never be NULL after
a successful call out of i40iw_make_cm_node().

Signed-off-by: Chien Tin Tung <chien.tin.tung@intel.com>
Signed-off-by: Henry Orosco <henry.orosco@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/i40iw/i40iw_cm.c

index 9e447b5951fcd4abdecc5c9c8927ae715fd74ac9..cbd77eb303854bff5edc052af0f1f93450bb5bf6 100644 (file)
@@ -2234,7 +2234,7 @@ static void i40iw_rem_ref_cm_node(struct i40iw_cm_node *cm_node)
                i40iw_dec_refcnt_listen(cm_core, cm_node->listener, 0, true);
        } else {
                if (!i40iw_listen_port_in_use(cm_core, cm_node->loc_port) &&
-                   cm_node->apbvt_set && cm_node->iwdev) {
+                   cm_node->apbvt_set) {
                        i40iw_manage_apbvt(cm_node->iwdev,
                                           cm_node->loc_port,
                                           I40IW_MANAGE_APBVT_DEL);