From: Wey-Yi Guy Date: Tue, 15 Jun 2010 00:09:56 +0000 (-0700) Subject: iwlwifi: code cleanup to remove un-necessary "goto" X-Git-Tag: v5.15~28789^2~385^2~72 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=936e8a734fea8f18d0d90846bb726fd5bd7e128b;p=mirror_ubuntu-kernels.git 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 --- 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; }