Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 936e8a73 authored by Wey-Yi Guy's avatar Wey-Yi Guy Committed by Reinette Chatre
Browse files

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: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
parent f84ac08d
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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;
}