summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiongfeng Wang <wangxiongfeng2@huawei.com>2020-07-21 22:24:07 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-26 10:27:08 +0200
commit1d75cce5bddbfc1358046785637a3786659aacc9 (patch)
treefca4f432babe3d30ff951431c7af0303203ed3bf
parent49abd862875fef2eba26a53aed0f617c550948bf (diff)
downloadlinux-stable-1d75cce5bddbfc1358046785637a3786659aacc9.tar.gz
linux-stable-1d75cce5bddbfc1358046785637a3786659aacc9.tar.bz2
linux-stable-1d75cce5bddbfc1358046785637a3786659aacc9.zip
Input: psmouse - add a newline when printing 'proto' by sysfs
[ Upstream commit 4aec14de3a15cf9789a0e19c847f164776f49473 ] When I cat parameter 'proto' by sysfs, it displays as follows. It's better to add a newline for easy reading. root@syzkaller:~# cat /sys/module/psmouse/parameters/proto autoroot@syzkaller:~# Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com> Link: https://lore.kernel.org/r/20200720073846.120724-1-wangxiongfeng2@huawei.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/input/mouse/psmouse-base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index ad18dab0ac47..5bd9633541b0 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -1911,7 +1911,7 @@ static int psmouse_get_maxproto(char *buffer, const struct kernel_param *kp)
{
int type = *((unsigned int *)kp->arg);
- return sprintf(buffer, "%s", psmouse_protocol_by_type(type)->name);
+ return sprintf(buffer, "%s\n", psmouse_protocol_by_type(type)->name);
}
static int __init psmouse_init(void)