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

Commit c4ba9621 authored by Saleem Abdulrasool's avatar Saleem Abdulrasool Committed by John W. Linville
Browse files

iwlwifi: fix possible NULL dereference in iwl_set_rate()

parent d9f8bcbf
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2915,6 +2915,10 @@ static void iwl_set_rate(struct iwl_priv *priv)
	int i;

	hw = iwl_get_hw_mode(priv, priv->phymode);
	if (!hw) {
		IWL_ERROR("Failed to set rate: unable to get hw mode\n");
		return;
	}

	priv->active_rate = 0;
	priv->active_rate_basic = 0;
+4 −0
Original line number Diff line number Diff line
@@ -3003,6 +3003,10 @@ static void iwl_set_rate(struct iwl_priv *priv)
	int i;

	hw = iwl_get_hw_mode(priv, priv->phymode);
	if (!hw) {
		IWL_ERROR("Failed to set rate: unable to get hw mode\n");
		return;
	}

	priv->active_rate = 0;
	priv->active_rate_basic = 0;