diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-06-14 13:44:51 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-07-21 12:26:38 +0300 |
commit | 2388bd7b133504fa0991f483db66fad3a0de8694 (patch) | |
tree | 0ed8d18ff371948553152b2317971b5b70350199 /drivers/net/wireless | |
parent | 61dd8a8a6a0c3cbfb6b02ab652c4f4efb93f3d79 (diff) | |
download | linux-2388bd7b133504fa0991f483db66fad3a0de8694.tar.bz2 |
iwlwifi: missing error code in iwl_trans_pcie_alloc()
We don't set the error code here so we end up returning ERR_PTR(0) which
is NULL. The caller doesn't expect that so it results in a NULL
dereference.
Fixes: 2e5d4a8f61dc ("iwlwifi: pcie: Add new configuration to enable MSIX")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index 92b3a55d0fbc..f95eec52508e 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -3150,7 +3150,8 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, init_waitqueue_head(&trans_pcie->d0i3_waitq); if (trans_pcie->msix_enabled) { - if (iwl_pcie_init_msix_handler(pdev, trans_pcie)) + ret = iwl_pcie_init_msix_handler(pdev, trans_pcie); + if (ret) goto out_no_pci; } else { ret = iwl_pcie_alloc_ict(trans); |