From 936e8a734fea8f18d0d90846bb726fd5bd7e128b Mon Sep 17 00:00:00 2001 From: Wey-Yi Guy Date: Mon, 14 Jun 2010 17:09:56 -0700 Subject: [PATCH] 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 Signed-off-by: Reinette Chatre --- drivers/net/wireless/iwlwifi/iwl-agn-calib.c | 10 +++++----- 1 file 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 d03b5e57759f..400eb312b555 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; } -- 2.34.1