Input: uinput - fix setting up device name
authorDavid Herrmann <dh.herrmann@googlemail.com>
Fri, 11 Feb 2011 09:10:44 +0000 (01:10 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 21 Feb 2011 09:02:28 +0000 (01:02 -0800)
commit5d9d6e91b835796c21fbd7ce479880e5181be112
treed7881c56527eb833a33d32899a4f879d51a2a6c9
parent26cdb1ae76f842e895ef4d09796a9101a7f8746b
Input: uinput - fix setting up device name

The check for non-empty device name was botched since we tried to account
for extra space for the terminating zero at the same time. Convert to
kstrndup() to avoid this problem.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Aristeu Rozanski <aris@ruivo.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/misc/uinput.c