diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2013-08-13 10:34:55 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-08-16 12:12:03 +0200 |
commit | eafe25e0afaf45a4e38f9b3560ac774a2395c695 (patch) | |
tree | 1a8fe594ad32769a6d56ea453690a46c30fdd82b /drivers/net/wireless/iwlwifi/pcie | |
parent | 3b1995ad83709ac2e1e86c99b37d5ba9ce410f56 (diff) | |
download | kernel_goldelico_gta04-eafe25e0afaf45a4e38f9b3560ac774a2395c695.zip kernel_goldelico_gta04-eafe25e0afaf45a4e38f9b3560ac774a2395c695.tar.gz kernel_goldelico_gta04-eafe25e0afaf45a4e38f9b3560ac774a2395c695.tar.bz2 |
iwlwifi: return -ENOMEM instead of NULL when OOM in iwl_drv_start()
The callers of iwl_drv_start() are probe functions. If a probe
function returns 0, it means it succeeded. So if NULL was returned by
iwl_drv_start(), it would be considered as a success.
Fix this by returning -ENOMEM if the driver struct allocation fails in
iwl_drv_start().
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c index e179efe..567ef01 100644 --- a/drivers/net/wireless/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/iwlwifi/pcie/drv.c @@ -332,7 +332,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) trans_pcie = IWL_TRANS_GET_PCIE_TRANS(iwl_trans); trans_pcie->drv = iwl_drv_start(iwl_trans, cfg); - if (IS_ERR_OR_NULL(trans_pcie->drv)) { + if (IS_ERR(trans_pcie->drv)) { ret = PTR_ERR(trans_pcie->drv); goto out_free_trans; } |