net/bnx2x: fix invalid free on unplug
[dpdk.git] / drivers / net / bnx2x / elink.c
index 9b3e00a..b65126d 100644 (file)
@@ -5203,11 +5203,12 @@ static elink_status_t elink_get_mod_abs_int_cfg(struct bnx2x_softc *sc,
                                PORT_HW_CFG_E3_MOD_ABS_MASK) >>
                                PORT_HW_CFG_E3_MOD_ABS_SHIFT;
 
-               /* Should not happen. This function called upon interrupt
-                * triggered by GPIO ( since EPIO can only generate interrupts
-                * to MCP).
+               /*
+                * This should not happen since this function is called
+                * from interrupt triggered by GPIO (since EPIO can only
+                * generate interrupts to MCP).
                 * So if this function was called and none of the GPIOs was set,
-                * it means the shit hit the fan.
+                * it means something disastrous has already happened.
                 */
                if ((cfg_pin < PIN_CFG_GPIO0_P0) ||
                    (cfg_pin > PIN_CFG_GPIO3_P1)) {
@@ -8096,7 +8097,7 @@ static elink_status_t elink_8073_8727_external_rom_boot(struct bnx2x_softc *sc,
                                             uint8_t port)
 {
        uint32_t count = 0;
-       uint16_t fw_ver1, fw_msgout;
+       uint16_t fw_ver1 = 0, fw_msgout;
        elink_status_t rc = ELINK_STATUS_OK;
 
        /* Boot port from external ROM  */