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>
unsigned long val;
u32 flags;
int ret = strict_strtoul(buf, 0, &val);
- if (!ret)
+ if (ret)
return ret;
flags = (u32)val;
unsigned long val;
u32 filter_flags;
int ret = strict_strtoul(buf, 0, &val);
- if (!ret)
+ if (ret)
return ret;
filter_flags = (u32)val;
}
ret = strict_strtoul(buf, 10, &mode);
- if (!ret)
+ if (ret)
goto out;
ret = iwl_power_set_user_mode(priv, mode);