Print this page
10094 i_mdi_client_free() doesn't need to check for a NULL cdip

@@ -19,10 +19,11 @@
  * CDDL HEADER END
  */
 /*
  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014 Nexenta Systems Inc. All rights reserved.
+ * Copyright (c) 2018, Joyent, Inc.
  */
 
 /*
  * Multipath driver interface (MDI) implementation; see mdi_impldefs.h for a
  * more detailed discussion of the overall mpxio architecture.

@@ -1476,15 +1477,14 @@
         cv_destroy(&ct->ct_unstable_cv);
         cv_destroy(&ct->ct_powerchange_cv);
         mutex_destroy(&ct->ct_mutex);
         kmem_free(ct, sizeof (*ct));
 
-        if (cdip != NULL) {
                 MDI_VHCI_CLIENT_UNLOCK(vh);
                 (void) i_mdi_devinfo_remove(vdip, cdip, flags);
                 MDI_VHCI_CLIENT_LOCK(vh);
-        }
+
         return (rv);
 }
 
 /*
  * i_mdi_client_find():