diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-05 14:24:34 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-06 15:16:11 -0500 |
commit | ce9e80af4f2c5dffb0df470538573d473c91d540 (patch) | |
tree | 975716127de250ce955a9b856d003dbb54f3ff86 | |
parent | 706c4ff67cb86134a3a93413a595a7c5559b7cc2 (diff) |
iwlwifi: reduce IDI code ifdef
The code in the two branches of the #ifdef
is almost the same so move the common code
outside the #ifdef.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-pci.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c index d109b0f32e33..c5e339ee918b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-pci.c +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c | |||
@@ -278,17 +278,9 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
278 | 278 | ||
279 | #ifdef CONFIG_IWLWIFI_IDI | 279 | #ifdef CONFIG_IWLWIFI_IDI |
280 | iwl_trans = iwl_trans_idi_alloc(shrd, pdev, ent); | 280 | iwl_trans = iwl_trans_idi_alloc(shrd, pdev, ent); |
281 | if (iwl_trans == NULL) { | ||
282 | err = -ENOMEM; | ||
283 | goto out_free_bus; | ||
284 | } | ||
285 | |||
286 | shrd->trans = iwl_trans; | ||
287 | pci_set_drvdata(pdev, iwl_trans); | ||
288 | |||
289 | err = iwl_drv_start(shrd, iwl_trans, cfg); | ||
290 | #else | 281 | #else |
291 | iwl_trans = iwl_trans_pcie_alloc(shrd, pdev, ent); | 282 | iwl_trans = iwl_trans_pcie_alloc(shrd, pdev, ent); |
283 | #endif | ||
292 | if (iwl_trans == NULL) { | 284 | if (iwl_trans == NULL) { |
293 | err = -ENOMEM; | 285 | err = -ENOMEM; |
294 | goto out_free_bus; | 286 | goto out_free_bus; |
@@ -298,7 +290,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
298 | pci_set_drvdata(pdev, iwl_trans); | 290 | pci_set_drvdata(pdev, iwl_trans); |
299 | 291 | ||
300 | err = iwl_drv_start(shrd, iwl_trans, cfg); | 292 | err = iwl_drv_start(shrd, iwl_trans, cfg); |
301 | #endif | ||
302 | if (err) | 293 | if (err) |
303 | goto out_free_trans; | 294 | goto out_free_trans; |
304 | 295 | ||