linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: pcie: Fix error code in iwl_trans_pcie_alloc()
@ 2017-07-12  7:53 Dan Carpenter
  2017-07-19  6:23 ` Coelho, Luciano
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2017-07-12  7:53 UTC (permalink / raw)
  To: Johannes Berg, Haim Dreyfuss
  Cc: Emmanuel Grumbach, Luca Coelho, Intel Linux Wireless, Kalle Valo,
	Sara Sharon, Liad Kaufman, Sharon Dvir, linux-wireless,
	kernel-janitors

We accidentally forgot to propogate the error code on this path.  It
means we return ERR_PTR(0) which is NULL and it results in a NULL
dereference in the caller.

Fixes: 2e5d4a8f61dc ("iwlwifi: pcie: Add new configuration to enable MSIX")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-19  8:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12  7:53 [PATCH] iwlwifi: pcie: Fix error code in iwl_trans_pcie_alloc() Dan Carpenter
2017-07-19  6:23 ` Coelho, Luciano
2017-07-19  8:21   ` Dan Carpenter
2017-07-19  8:23     ` Coelho, Luciano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).