Commit 77e7427e authored by Johannes Berg's avatar Johannes Berg
Browse files

wifi: iwlwifi: pcie: propagate iwl_pcie_gen2_apm_init() error



If iwl_pcie_gen2_apm_init() fails, we should propagate the
error code up, rather than ignoring it.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230926110319.883768afe77b.Ic47cb8ce0a0abba3b4745cc2a721217c33360d6c@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 5a86dcb4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -230,11 +230,14 @@ static int iwl_pcie_gen2_nic_init(struct iwl_trans *trans)
	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
	int queue_size = max_t(u32, IWL_CMD_QUEUE_SIZE,
			       trans->cfg->min_txq_size);
	int ret;

	/* TODO: most of the logic can be removed in A0 - but not in Z0 */
	spin_lock_bh(&trans_pcie->irq_lock);
	iwl_pcie_gen2_apm_init(trans);
	ret = iwl_pcie_gen2_apm_init(trans);
	spin_unlock_bh(&trans_pcie->irq_lock);
	if (ret)
		return ret;

	iwl_op_mode_nic_config(trans->op_mode);