diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-04-13 12:14:48 +0200 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-04-22 19:02:55 +0200 |
commit | a8674a1efca60d863d4caa47e102cc4d70d5ff9b (patch) | |
tree | 13216e202f8d78d178174f46c7fa8654422b6c9e /drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |
parent | iwlagn: extend notification wait function (diff) | |
download | linux-a8674a1efca60d863d4caa47e102cc4d70d5ff9b.tar.xz linux-a8674a1efca60d863d4caa47e102cc4d70d5ff9b.zip |
iwlagn: make iwlagn_wait_notification return error code
We're unlikely to care about the actual time spent
waiting, so make the function return an error code
which is less error prone in coding new uses.
Also, while at it, mark __must_check.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rxon.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index ee7c5ba95971..435dd2d6c0ab 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c @@ -73,13 +73,9 @@ static int iwlagn_disable_pan(struct iwl_priv *priv, IWL_ERR(priv, "Error disabling PAN (%d)\n", ret); iwlagn_remove_notification(priv, &disable_wait); } else { - signed long wait_res; - - wait_res = iwlagn_wait_notification(priv, &disable_wait, HZ); - if (wait_res == 0) { + ret = iwlagn_wait_notification(priv, &disable_wait, HZ); + if (ret) IWL_ERR(priv, "Timed out waiting for PAN disable\n"); - ret = -EIO; - } } return ret; |