diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-12-11 16:03:03 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-12-11 16:03:03 -0500 |
commit | ecbbec2eb093d2ef205de371af986f0360fca539 (patch) | |
tree | 57ab3b0c684f957aee568230fadb32995e00da6b /drivers/net/wireless/iwlwifi/pcie/drv.c | |
parent | 36b07d15a656b657beaf9e6357a341768192fad2 (diff) | |
parent | 25a172655f837bdb032e451f95441bb4acec51bb (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie/drv.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/drv.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c index 2b7e8a0b1cd4..c2e141af353c 100644 --- a/drivers/net/wireless/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/iwlwifi/pcie/drv.c | |||
@@ -267,6 +267,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
267 | const struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); | 267 | const struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data); |
268 | struct iwl_trans *iwl_trans; | 268 | struct iwl_trans *iwl_trans; |
269 | struct iwl_trans_pcie *trans_pcie; | 269 | struct iwl_trans_pcie *trans_pcie; |
270 | int ret; | ||
270 | 271 | ||
271 | iwl_trans = iwl_trans_pcie_alloc(pdev, ent, cfg); | 272 | iwl_trans = iwl_trans_pcie_alloc(pdev, ent, cfg); |
272 | if (iwl_trans == NULL) | 273 | if (iwl_trans == NULL) |
@@ -276,11 +277,15 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
276 | 277 | ||
277 | trans_pcie = IWL_TRANS_GET_PCIE_TRANS(iwl_trans); | 278 | trans_pcie = IWL_TRANS_GET_PCIE_TRANS(iwl_trans); |
278 | trans_pcie->drv = iwl_drv_start(iwl_trans, cfg); | 279 | trans_pcie->drv = iwl_drv_start(iwl_trans, cfg); |
279 | if (!trans_pcie->drv) | 280 | |
281 | if (IS_ERR_OR_NULL(trans_pcie->drv)) { | ||
282 | ret = PTR_ERR(trans_pcie->drv); | ||
280 | goto out_free_trans; | 283 | goto out_free_trans; |
284 | } | ||
281 | 285 | ||
282 | /* register transport layer debugfs here */ | 286 | /* register transport layer debugfs here */ |
283 | if (iwl_trans_dbgfs_register(iwl_trans, iwl_trans->dbgfs_dir)) | 287 | ret = iwl_trans_dbgfs_register(iwl_trans, iwl_trans->dbgfs_dir); |
288 | if (ret) | ||
284 | goto out_free_drv; | 289 | goto out_free_drv; |
285 | 290 | ||
286 | return 0; | 291 | return 0; |
@@ -290,7 +295,7 @@ out_free_drv: | |||
290 | out_free_trans: | 295 | out_free_trans: |
291 | iwl_trans_pcie_free(iwl_trans); | 296 | iwl_trans_pcie_free(iwl_trans); |
292 | pci_set_drvdata(pdev, NULL); | 297 | pci_set_drvdata(pdev, NULL); |
293 | return -EFAULT; | 298 | return ret; |
294 | } | 299 | } |
295 | 300 | ||
296 | static void iwl_pci_remove(struct pci_dev *pdev) | 301 | static void iwl_pci_remove(struct pci_dev *pdev) |