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

Commit 97489c28 authored by Brian Norris's avatar Brian Norris Committed by Kalle Valo
Browse files

mwifiex: pcie: stop checking for NULL adapter->card



It should never be NULL here, and to think otherwise makes things
confusing.

Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent e98fb11f
Loading
Loading
Loading
Loading
+23 −30
Original line number Diff line number Diff line
@@ -3015,11 +3015,9 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter)
{
	struct pcie_service_card *card = adapter->card;
	struct pci_dev *pdev;
	struct pci_dev *pdev = card->dev;
	int i;

	if (card) {
		pdev = card->dev;
	if (card->msix_enable) {
		for (i = 0; i < MWIFIEX_NUM_MSIX_VECTORS; i++)
			synchronize_irq(card->msix_entries[i].vector);
@@ -3040,7 +3038,6 @@ static void mwifiex_unregister_dev(struct mwifiex_adapter *adapter)
	}
	card->adapter = NULL;
}
}

/* This function initializes the PCI-E host memory space, WCB rings, etc.
 *
@@ -3122,7 +3119,6 @@ static void mwifiex_pcie_down_dev(struct mwifiex_adapter *adapter)
	adapter->seq_num = 0;
	adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K;

	if (card) {
	if (reg->sleep_cookie)
		mwifiex_pcie_delete_sleep_cookie_buf(adapter);

@@ -3133,9 +3129,6 @@ static void mwifiex_pcie_down_dev(struct mwifiex_adapter *adapter)
	card->cmdrsp_buf = NULL;
}

	return;
}

static struct mwifiex_if_ops pcie_ops = {
	.init_if =			mwifiex_pcie_init,
	.cleanup_if =			mwifiex_pcie_cleanup,