Skip to content

Commit c4af8c2

Browse files
fenghusthugregkh
authored andcommitted
Input: psmouse - add a newline when printing 'proto' by sysfs
[ Upstream commit 4aec14d ] 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>
1 parent 773ae06 commit c4af8c2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/input/mouse/psmouse-base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2044,7 +2044,7 @@ static int psmouse_get_maxproto(char *buffer, const struct kernel_param *kp)
20442044
{
20452045
int type = *((unsigned int *)kp->arg);
20462046

2047-
return sprintf(buffer, "%s", psmouse_protocol_by_type(type)->name);
2047+
return sprintf(buffer, "%s\n", psmouse_protocol_by_type(type)->name);
20482048
}
20492049

20502050
static int __init psmouse_init(void)

0 commit comments

Comments
 (0)