diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 465918cf77f1..a8fa1bfa570b 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -8531,21 +8531,18 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8531 | iwl4965_hw_ops.hw_scan = NULL; | 8531 | iwl4965_hw_ops.hw_scan = NULL; |
8532 | } | 8532 | } |
8533 | 8533 | ||
8534 | /* mac80211 allocates memory for this device instance, including | 8534 | hw = iwl_alloc_all(cfg, &iwl4965_hw_ops); |
8535 | * space for this driver's private structure */ | 8535 | if (!hw) { |
8536 | hw = ieee80211_alloc_hw(sizeof(struct iwl_priv), &iwl4965_hw_ops); | ||
8537 | if (hw == NULL) { | ||
8538 | IWL_ERROR("Can not allocate network device\n"); | ||
8539 | err = -ENOMEM; | 8536 | err = -ENOMEM; |
8540 | goto out; | 8537 | goto out; |
8541 | } | 8538 | } |
8539 | priv = hw->priv; | ||
8540 | /* At this point both hw and priv are allocated. */ | ||
8541 | |||
8542 | SET_IEEE80211_DEV(hw, &pdev->dev); | 8542 | SET_IEEE80211_DEV(hw, &pdev->dev); |
8543 | 8543 | ||
8544 | IWL_DEBUG_INFO("*** LOAD DRIVER ***\n"); | 8544 | IWL_DEBUG_INFO("*** LOAD DRIVER ***\n"); |
8545 | priv = hw->priv; | ||
8546 | priv->hw = hw; | ||
8547 | priv->cfg = cfg; | 8545 | priv->cfg = cfg; |
8548 | |||
8549 | priv->pci_dev = pdev; | 8546 | priv->pci_dev = pdev; |
8550 | 8547 | ||
8551 | #ifdef CONFIG_IWLWIFI_DEBUG | 8548 | #ifdef CONFIG_IWLWIFI_DEBUG |