iwlagn: remove hw_ready variable

This variable is only ever checked right after
the function that sets it, but the same function
will also return the status, so we can pass it
through instead of checking hw_ready later.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
This commit is contained in:
Johannes Berg
2011-04-13 03:14:52 -07:00
committed by Wey-Yi Guy
parent dbf28e21ca
commit 4cd2bf76a4
3 changed files with 15 additions and 18 deletions

View File

@@ -2306,8 +2306,7 @@ int iwlagn_start_device(struct iwl_priv *priv)
{
int ret;
iwl_prepare_card_hw(priv);
if (!priv->hw_ready) {
if (iwl_prepare_card_hw(priv)) {
IWL_WARN(priv, "Exit HW not ready\n");
return -EIO;
}