aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/sysfs.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/sysfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/sysfs.c b/drivers/net/wireless/ath/ath5k/sysfs.c
index 1090bbab9459..5406f44309c8 100644
--- a/drivers/net/wireless/ath/ath5k/sysfs.c
+++ b/drivers/net/wireless/ath/ath5k/sysfs.c
@@ -19,9 +19,11 @@ static ssize_t ath5k_attr_store_##name(struct device *dev, \
19 const char *buf, size_t count) \ 19 const char *buf, size_t count) \
20{ \ 20{ \
21 struct ath5k_softc *sc = dev_get_drvdata(dev); \ 21 struct ath5k_softc *sc = dev_get_drvdata(dev); \
22 int val; \ 22 int val, ret; \
23 \ 23 \
24 val = (int)simple_strtoul(buf, NULL, 10); \ 24 ret = kstrtoint(buf, 10, &val); \
25 if (ret < 0) \
26 return ret; \
25 set(sc->ah, val); \ 27 set(sc->ah, val); \
26 return count; \ 28 return count; \
27} \ 29} \