提交 936e8a73 编写于 作者: W Wey-Yi Guy 提交者: Reinette Chatre

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: NWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
上级 f84ac08d
...@@ -96,14 +96,14 @@ int iwl_send_calib_results(struct iwl_priv *priv) ...@@ -96,14 +96,14 @@ int iwl_send_calib_results(struct iwl_priv *priv)
hcmd.len = priv->calib_results[i].buf_len; hcmd.len = priv->calib_results[i].buf_len;
hcmd.data = priv->calib_results[i].buf; hcmd.data = priv->calib_results[i].buf;
ret = iwl_send_cmd_sync(priv, &hcmd); ret = iwl_send_cmd_sync(priv, &hcmd);
if (ret) if (ret) {
goto err; 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; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册