mac80211: use kstrtoull return value
authorJohannes Berg <johannes.berg@intel.com>
Mon, 5 Nov 2012 19:30:39 +0000 (20:30 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 7 Nov 2012 17:01:41 +0000 (18:01 +0100)
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>
net/mac80211/debugfs_netdev.c

index 99ce871bfcf920f9f0a6b11faa285964bd93b844..9b6afb3698f646077db0507960316b8fae7b4174 100644 (file)
@@ -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) {