diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2012-11-28 16:42:09 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-11-29 16:04:27 +0100 |
commit | 59f547ac5ba71a01232b023cb80f1fe05739dbbf (patch) | |
tree | 6177ff33d53e50ee1628d038b265e5ff959ed8c2 /drivers/net/wireless/iwlwifi/iwl-drv.c | |
parent | b4991f3f7bdc2402a3d7d841eb4376bda4f7a56b (diff) |
iwlwifi: return real info in probe failure
Don't return a hard coded -EFAULT, but rather the error
that occurred in the flow.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-drv.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-drv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c index 198634b75ed..d3549f493a1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/iwlwifi/iwl-drv.c @@ -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; } @@ -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; @@ -1060,9 +1061,8 @@ err_free_dbgfs: err_free_drv: #endif kfree(drv); - drv = NULL; - return drv; + return ERR_PTR(ret); } void iwl_drv_stop(struct iwl_drv *drv) |