Print this page
10703 smatch unreachable code checking needs reworking
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>

@@ -20,10 +20,11 @@
  */
 
 /*
  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012 Garrett D'Amore <garrett@damore.org>.  All rights reserved.
+ * Copyright 2019 Joyent, Inc.
  */
 
 #include <sys/sunddi.h>
 #include <sys/sunndi.h>
 #include <sys/iommulib.h>

@@ -1390,20 +1391,18 @@
                         ndi_rele_devi(rdip);
                         return (pdip);
                 }
         }
 
-        cmn_err(
 #ifdef  DEBUG
-            CE_PANIC,
+        cmn_err(CE_PANIC, "%s: %s%d dip = %p has no PCI parent, path = %s",
+            f, driver, instance, (void *)rdip, path);
 #else
-            CE_WARN,
-#endif  /* DEBUG */
-            "%s: %s%d dip = %p has no PCI parent, path = %s",
+        cmn_err(CE_WARN, "%s: %s%d dip = %p has no PCI parent, path = %s",
             f, driver, instance, (void *)rdip, path);
-
         ndi_rele_devi(rdip);
+#endif  /* DEBUG */
 
         return (NULL);
 }
 
 /* Interface with IOMMULIB */