Skip to content

Commit

Permalink
mac80211: use kstrtoull return value
Browse files Browse the repository at this point in the history
If kstrtoull() returns an error code (a value
smaller than zero), use it since it can be an
error other than -EINVAL.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Nov 7, 2012
1 parent 41c97a2 commit 6fc1da9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/debugfs_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ static ssize_t ieee80211_if_parse_tsf(
}
ret = kstrtoull(buf, 10, &tsf);
if (ret < 0)
return -EINVAL;
return ret;
if (tsf_is_delta)
tsf = drv_get_tsf(local, sdata) + tsf_is_delta * tsf;
if (local->ops->set_tsf) {
Expand Down

0 comments on commit 6fc1da9

Please sign in to comment.