Input: synaptics - fix misuse of strlcpy
authorJoe Perches <joe@perches.com>
Sun, 14 Jul 2019 18:27:51 +0000 (11:27 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 15 Jul 2019 16:40:53 +0000 (09:40 -0700)
Probable cut&paste typo - use the correct field size.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/synaptics.c

index 774cddc3f066cc7dfe04784de02518d554ba077b..12313424e97d4d15da8008b1ed2a6997fab3b7bf 100644 (file)
@@ -706,7 +706,7 @@ static void synaptics_pt_create(struct psmouse *psmouse)
 
        serio->id.type = SERIO_PS_PSTHRU;
        strlcpy(serio->name, "Synaptics pass-through", sizeof(serio->name));
-       strlcpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->name));
+       strlcpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->phys));
        serio->write = synaptics_pt_write;
        serio->start = synaptics_pt_start;
        serio->stop = synaptics_pt_stop;