[IPOIB] fixing bugs in previous commit. (mlnx 5205)
[mirror/winof/.git] / ulp / ipoib / kernel / ipoib_driver.c
index f8809bc..32cad65 100644 (file)
@@ -603,12 +603,16 @@ ipoib_get_adapter_params(
 \r
        p_adapter->params.xfer_block_size = (sizeof(eth_hdr_t) + p_adapter->params.payload_mtu);\r
        NdisReadNetworkAddress( &status, p_mac, p_len, h_config );\r
-\r
+       if (status != NDIS_STATUS_SUCCESS) {\r
+               // Don't rely on NDIS, zero the values\r
+               *p_mac = NULL;\r
+               *p_len = 0;\r
+       }\r
 \r
        NdisCloseConfiguration( h_config );\r
 \r
        IPOIB_EXIT( IPOIB_DBG_INIT );\r
-       return status;\r
+       return NDIS_STATUS_SUCCESS;\r
 }\r
 \r
 \r