Skip to content

Commit

Permalink
iwlwifi: code cleanup to remove un-necessary "goto"
Browse files Browse the repository at this point in the history
Break out of loop and log the error message when encounter error; this is
better approach than using "goto".

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
  • Loading branch information
Wey-Yi Guy authored and Reinette Chatre committed Jun 21, 2010
1 parent f84ac08 commit 936e8a7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/net/wireless/iwlwifi/iwl-agn-calib.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ int iwl_send_calib_results(struct iwl_priv *priv)
hcmd.len = priv->calib_results[i].buf_len;
hcmd.data = priv->calib_results[i].buf;
ret = iwl_send_cmd_sync(priv, &hcmd);
if (ret)
goto err;
if (ret) {
IWL_ERR(priv, "Error %d iteration %d\n",
ret, i);
break;
}
}
}

return 0;
err:
IWL_ERR(priv, "Error %d iteration %d\n", ret, i);
return ret;
}

Expand Down

0 comments on commit 936e8a7

Please sign in to comment.