summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-picolcd_fb.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-03-17 19:38:03 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-03-17 19:38:03 +0300
commitac309e7744bee222df6de0122facaf2d9706fa70 (patch)
treedbcb4da7f4e206b4dd387427a02c0d71cd0a4309 /drivers/hid/hid-picolcd_fb.c
parent3d135f522476a815699dfbefb685de50bc5c12d6 (diff)
parent819d578d51d0ce73f06e35d69395ef55cd683a74 (diff)
downloadlinux-ac309e7744bee222df6de0122facaf2d9706fa70.tar.xz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID fixes from Jiri Kosina: - string buffer formatting fixes in picolcd and sensor drivers, from Takashi Iwai - two new device IDs from Chen-Tsung Hsieh and Tony Fischetti * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: add ALWAYS_POLL quirk to lenovo pixart mouse HID: google: add moonball USB id HID: hid-sensor-custom: Use scnprintf() for avoiding potential buffer overflow HID: hid-picolcd_fb: Use scnprintf() for avoiding potential buffer overflow
Diffstat (limited to 'drivers/hid/hid-picolcd_fb.c')
-rw-r--r--drivers/hid/hid-picolcd_fb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c
index a549c42e8c90..33c102a60992 100644
--- a/drivers/hid/hid-picolcd_fb.c
+++ b/drivers/hid/hid-picolcd_fb.c
@@ -458,9 +458,9 @@ static ssize_t picolcd_fb_update_rate_show(struct device *dev,
if (ret >= PAGE_SIZE)
break;
else if (i == fb_update_rate)
- ret += snprintf(buf+ret, PAGE_SIZE-ret, "[%u] ", i);
+ ret += scnprintf(buf+ret, PAGE_SIZE-ret, "[%u] ", i);
else
- ret += snprintf(buf+ret, PAGE_SIZE-ret, "%u ", i);
+ ret += scnprintf(buf+ret, PAGE_SIZE-ret, "%u ", i);
if (ret > 0)
buf[min(ret, (size_t)PAGE_SIZE)-1] = '\n';
return ret;