Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342122
b: refs/heads/master
c: 59f547a
h: refs/heads/master
v: v3
  • Loading branch information
Emmanuel Grumbach authored and Johannes Berg committed Nov 29, 2012
1 parent 26684b4 commit 6635db4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4991f3f7bdc2402a3d7d841eb4376bda4f7a56b
refs/heads/master: 59f547ac5ba71a01232b023cb80f1fe05739dbbf
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/iwlwifi/iwl-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,7 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans,

if (!drv->dbgfs_drv) {
IWL_ERR(drv, "failed to create debugfs directory\n");
ret = -ENOMEM;
goto err_free_drv;
}

Expand All @@ -1040,12 +1041,12 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans,

if (!drv->trans->dbgfs_dir) {
IWL_ERR(drv, "failed to create transport debugfs directory\n");
ret = -ENOMEM;
goto err_free_dbgfs;
}
#endif

ret = iwl_request_firmware(drv, true);

if (ret) {
IWL_ERR(trans, "Couldn't request the fw\n");
goto err_fw;
Expand All @@ -1060,9 +1061,8 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans,
err_free_drv:
#endif
kfree(drv);
drv = NULL;

return drv;
return ERR_PTR(ret);
}

void iwl_drv_stop(struct iwl_drv *drv)
Expand Down
11 changes: 8 additions & 3 deletions trunk/drivers/net/wireless/iwlwifi/pcie/drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
const struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data);
struct iwl_trans *iwl_trans;
struct iwl_trans_pcie *trans_pcie;
int ret;

iwl_trans = iwl_trans_pcie_alloc(pdev, ent, cfg);
if (iwl_trans == NULL)
Expand All @@ -276,11 +277,15 @@ 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 (!trans_pcie->drv)

if (IS_ERR_OR_NULL(trans_pcie->drv)) {
ret = PTR_ERR(trans_pcie->drv);
goto out_free_trans;
}

/* register transport layer debugfs here */
if (iwl_trans_dbgfs_register(iwl_trans, iwl_trans->dbgfs_dir))
ret = iwl_trans_dbgfs_register(iwl_trans, iwl_trans->dbgfs_dir);
if (ret)
goto out_free_drv;

return 0;
Expand All @@ -290,7 +295,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
out_free_trans:
iwl_trans_pcie_free(iwl_trans);
pci_set_drvdata(pdev, NULL);
return -EFAULT;
return ret;
}

static void __devexit iwl_pci_remove(struct pci_dev *pdev)
Expand Down

0 comments on commit 6635db4

Please sign in to comment.