diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-06-14 17:09:56 -0700 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-06-21 10:47:39 -0700 |
commit | 936e8a734fea8f18d0d90846bb726fd5bd7e128b (patch) | |
tree | 370f1441f2b1d3a8d9f90731a69b873c7d7fe18b /drivers/net/wireless/iwlwifi | |
parent | f84ac08db25f60a6973cac1a90f392b286054e2f (diff) |
iwlwifi: code cleanup to remove un-necessary "goto"
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-calib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c index d03b5e57759..400eb312b55 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c @@ -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; } |