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

Commit e3df1e4b authored by Sharon Dvir's avatar Sharon Dvir Committed by Luca Coelho
Browse files

iwlwifi: mvm: check if returned value is NULL



While freeing inactive queue, check mvmsta to be valid before
dereferencing it.  Found by Klocwork.

Signed-off-by: default avatarSharon Dvir <sharon.dvir@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 8c5f47b1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -495,6 +495,8 @@ static int iwl_mvm_free_inactive_queue(struct iwl_mvm *mvm, int queue,
	spin_unlock_bh(&mvm->queue_info_lock);

	mvmsta = iwl_mvm_sta_from_staid_protected(mvm, sta_id);
	if (WARN_ON(!mvmsta))
		return -EINVAL;

	disable_agg_tids = iwl_mvm_remove_sta_queue_marking(mvm, queue);
	/* Disable the queue */