Skip to content

Commit

Permalink
ixgbe: fix return value checks
Browse files Browse the repository at this point in the history
The value of status was incorrectly tested. Also whitespace cleanup.

Signed-off-by: Emil Tantilov <[email protected]>
Tested-by: Evan Swanson <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
  • Loading branch information
etantilov authored and Jeff Kirsher committed Apr 14, 2011
1 parent c8ca76e commit 2ea5ea5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/ixgbe/ixgbe_x540.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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;
Expand Down

0 comments on commit 2ea5ea5

Please sign in to comment.