aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2008-09-02 23:26:39 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-08 14:23:18 -0400
commit926f0b2ef24041db876ec7213fbddd7cd4555951 (patch)
tree694ca2aa5b65bc7f9516333b80d0e7a61388ae30 /drivers
parent6e21f2c109edd746a10e08186484bae8168cdd0c (diff)
iwlwifi: fix strict_strtoul error checking
This patch fixes handling of strcit_strtoul return value "0 == sucess". Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index b9798fa519ff..ffaf3f2e8a9e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3726,7 +3726,7 @@ static ssize_t store_flags(struct device *d,
3726 unsigned long val; 3726 unsigned long val;
3727 u32 flags; 3727 u32 flags;
3728 int ret = strict_strtoul(buf, 0, &val); 3728 int ret = strict_strtoul(buf, 0, &val);
3729 if (!ret) 3729 if (ret)
3730 return ret; 3730 return ret;
3731 flags = (u32)val; 3731 flags = (u32)val;
3732 3732
@@ -3765,7 +3765,7 @@ static ssize_t store_filter_flags(struct device *d,
3765 unsigned long val; 3765 unsigned long val;
3766 u32 filter_flags; 3766 u32 filter_flags;
3767 int ret = strict_strtoul(buf, 0, &val); 3767 int ret = strict_strtoul(buf, 0, &val);
3768 if (!ret) 3768 if (ret)
3769 return ret; 3769 return ret;
3770 filter_flags = (u32)val; 3770 filter_flags = (u32)val;
3771 3771
@@ -3905,7 +3905,7 @@ static ssize_t store_power_level(struct device *d,
3905 } 3905 }
3906 3906
3907 ret = strict_strtoul(buf, 10, &mode); 3907 ret = strict_strtoul(buf, 10, &mode);
3908 if (!ret) 3908 if (ret)
3909 goto out; 3909 goto out;
3910 3910
3911 ret = iwl_power_set_user_mode(priv, mode); 3911 ret = iwl_power_set_user_mode(priv, mode);