Skip to contentSkip to conversation

mwifiex: enable pcie MSIx interrupt mode support

DISCUSSION Dan Carpenter 1 participant 1 message Feb 2, 2016

lore
Share & tools
lore
#0 lore raw

Hello Xinming Hu,

This is a semi-automatic email about new static checker warnings.

The patch 99074fc1e67b: "mwifiex: enable pcie MSIx interrupt mode support" from Jan 11, 2016, leads to the following Smatch complaint:

drivers/net/wireless/marvell/mwifiex/pcie.c:2780 mwifiex_unregister_dev()
warn: variable dereferenced before check 'card' (see line 2777)

drivers/net/wireless/marvell/mwifiex/pcie.c
2776 const struct mwifiex_pcie_card_reg *reg;

  2777		struct pci_dev *pdev = card->dev;
                                       ^^^^^^^^^

New dereference.

2778 int i;
2779

  2780		if (card) {
                    ^^^^

Old check.

  2781			if (card->msix_enable) {
  2782				for (i = 0; i < MWIFIEX_NUM_MSIX_VECTORS; i++)

regards,
dan carpenter