aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorPavel Kubelun <be.dissent@gmail.com>2016-11-28 15:14:50 +0300
committerJohn Crispin <john@phrozen.org>2016-12-01 15:47:43 +0100
commit65b20d8b64bb5c6d8b9375d3952899b6aaaa302e (patch)
tree0021fa221d9ec8dc7545641bccf38f9ae8829a9d /target
parent9aa734f8f5f3a2804a562f14091b684614941249 (diff)
downloadupstream-65b20d8b64bb5c6d8b9375d3952899b6aaaa302e.tar.gz
upstream-65b20d8b64bb5c6d8b9375d3952899b6aaaa302e.tar.bz2
upstream-65b20d8b64bb5c6d8b9375d3952899b6aaaa302e.zip
net: ar8327: replace sprintf() by scnprintf()
Import from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/fd0c41c7b9327ce003f44df38ce42556fb177b17%5E%21/#F0 Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> CHROMIUM: drivers: ar8216: replace sprintf() by scnprintf() BUG=chrome-os-partner:33096 TEST=none Change-Id: Ib82035c9f2769a86d3e90f9573a09e5700ff5676 Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> Reviewed-on: https://chromium-review.googlesource.com/232829 Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Tested-by: Toshi Kikuchi <toshik@chromium.org> Reviewed-by: Toshi Kikuchi <toshik@chromium.org>
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8327.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index d5cc97bc33..d2a5a5b6be 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -306,7 +306,7 @@ ar8327_led_enable_hw_mode_show(struct device *dev,
struct ar8327_led *aled = led_cdev_to_ar8327_led(led_cdev);
ssize_t ret = 0;
- ret += sprintf(buf, "%d\n", aled->enable_hw_mode);
+ ret += scnprintf(buf, PAGE_SIZE, "%d\n", aled->enable_hw_mode);
return ret;
}
@@ -1433,4 +1433,3 @@ const struct ar8xxx_chip ar8337_chip = {
.mib_decs = ar8236_mibs,
.mib_func = AR8327_REG_MIB_FUNC
};
-