[MTHCA] mthca_provider.c - prevent dereference of <NULL> mdev or mdev->ext
[mirror/winof/.git] / hw / mthca / kernel / hca_pnp.c
index 5966b5e..3a9c0dd 100644 (file)
@@ -803,7 +803,7 @@ static void
 __ref_ifc(\r
        IN                              DEVICE_OBJECT*                          p_dev_obj )\r
 {\r
-       hca_dev_ext_t                   *p_ext  = (hca_dev_ext_t*)p_dev_obj->DeviceExtension;\r
+       hca_dev_ext_t   *p_ext  = (hca_dev_ext_t*)p_dev_obj->DeviceExtension;\r
 \r
        HCA_ENTER( HCA_DBG_PNP );\r
 \r
@@ -811,7 +811,7 @@ __ref_ifc(
        ObReferenceObject( p_dev_obj );\r
 \r
        HCA_PRINT( TRACE_LEVEL_ERROR, HCA_DBG_PNP, \r
-               ("MLX4_HCA: CA_guid %I64x, hca_ifc_ref %d\n",\r
+               ("MTHCA: CA_guid %I64x, hca_ifc_ref %d\n",\r
                p_ext->hca.guid, p_ext->n_hca_ifc_ref) );\r
 \r
        HCA_EXIT( HCA_DBG_PNP );\r
@@ -821,7 +821,7 @@ static void
 __deref_ifc(\r
        IN                              DEVICE_OBJECT*                          p_dev_obj )\r
 {\r
-       hca_dev_ext_t                   *p_ext  = (hca_dev_ext_t*)p_dev_obj->DeviceExtension;\r
+       hca_dev_ext_t   *p_ext  = (hca_dev_ext_t*)p_dev_obj->DeviceExtension;\r
 \r
        HCA_ENTER( HCA_DBG_PNP );\r
 \r
@@ -829,7 +829,7 @@ __deref_ifc(
        ObDereferenceObject( p_dev_obj );\r
 \r
        HCA_PRINT( TRACE_LEVEL_ERROR, HCA_DBG_PNP, \r
-               ("MLX4_HCA: CA_guid %I64x, hca_ifc_ref %d\n",\r
+               ("MTHCA: CA_guid %I64x, hca_ifc_ref %d\n",\r
                p_ext->hca.guid, p_ext->n_hca_ifc_ref) );\r
 \r
        HCA_EXIT( HCA_DBG_PNP );\r