]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ixgbe: fix return value checks
authorEmil Tantilov <emil.s.tantilov@intel.com>
Sat, 12 Mar 2011 08:56:38 +0000 (08:56 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 14 Apr 2011 02:20:15 +0000 (19:20 -0700)
The value of status was incorrectly tested. Also whitespace cleanup.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ixgbe/ixgbe_x540.c

index d9323c08f5c7678ec5edce620d0f21f3f46e5c44..7ce3f45cad717a049eee74cc597515ae719e35b0 100644 (file)
@@ -452,7 +452,7 @@ static s32 ixgbe_update_flash_X540(struct ixgbe_hw *hw)
        IXGBE_WRITE_REG(hw, IXGBE_EEC, flup);
 
        status = ixgbe_poll_flash_update_done_X540(hw);
-       if (status)
+       if (status == 0)
                hw_dbg(hw, "Flash update complete\n");
        else
                hw_dbg(hw, "Flash update time out\n");
@@ -466,11 +466,10 @@ static s32 ixgbe_update_flash_X540(struct ixgbe_hw *hw)
                }
 
                status = ixgbe_poll_flash_update_done_X540(hw);
-               if (status)
+               if (status == 0)
                        hw_dbg(hw, "Flash update complete\n");
                else
                        hw_dbg(hw, "Flash update time out\n");
-
        }
 out:
        return status;