s390/keyboard: avoid off-by-one when using strnlen_user()
authorJan Kara <jack@suse.cz>
Tue, 2 Jun 2015 10:38:39 +0000 (12:38 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 15 Jun 2015 08:51:12 +0000 (10:51 +0200)
commit8cb81811e924ff0214ce4e8344e2feb1549cf0ce
tree4bb8a52ff2121d335f893ad2d2cf4bfa89e47ece
parent2e4aa2f2bdcf9b80bace0b0c460bd407d76f49d3
s390/keyboard: avoid off-by-one when using strnlen_user()

strnlen_user() returns the length of the string including terminating 0.
So avoid counting it again and unnecessarily reducing maximum string
size by 1.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/keyboard.c