archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <>
To: Johannes Berg <>,
	Haim Dreyfuss <>
Cc: Emmanuel Grumbach <>,
	Luca Coelho <>,
	Intel Linux Wireless <>,
	Kalle Valo <>,
	Sara Sharon <>,
	Liad Kaufman <>,
	Sharon Dvir <>,,
Subject: [PATCH] iwlwifi: pcie: Fix error code in iwl_trans_pcie_alloc()
Date: Wed, 12 Jul 2017 10:53:00 +0300	[thread overview]
Message-ID: <20170712075300.sbd2vlwqf4rriale@mwanda> (raw)

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

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

             reply	other threads:[~2017-07-12  7:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12  7:53 Dan Carpenter [this message]
2017-07-19  6:23 ` [PATCH] iwlwifi: pcie: Fix error code in iwl_trans_pcie_alloc() Coelho, Luciano
2017-07-19  8:21   ` Dan Carpenter
2017-07-19  8:23     ` Coelho, Luciano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170712075300.sbd2vlwqf4rriale@mwanda \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).