From cb3b5dccca9d011f764de139f88a1db3b9d21d82 Mon Sep 17 00:00:00 2001 From: Sameer Wadgaonkar Date: Wed, 27 Sep 2017 13:14:43 -0400 Subject: staging: unisys: check the whole channel instead of just guid for match Validate that the channel contents match the channel type that we are matching. Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman --- drivers/staging/unisys/visorinput/visorinput.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/staging/unisys/visorinput') diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c index 1b58663709e6..450f003743c0 100644 --- a/drivers/staging/unisys/visorinput/visorinput.c +++ b/drivers/staging/unisys/visorinput/visorinput.c @@ -712,8 +712,9 @@ out: /* GUIDS for all channel types supported by this driver. */ static struct visor_channeltype_descriptor visorinput_channel_types[] = { - { VISOR_KEYBOARD_CHANNEL_GUID, "keyboard"}, - { VISOR_MOUSE_CHANNEL_GUID, "mouse"}, + { VISOR_KEYBOARD_CHANNEL_GUID, "keyboard", + sizeof(struct channel_header), 0 }, + { VISOR_MOUSE_CHANNEL_GUID, "mouse", sizeof(struct channel_header), 0 }, {} }; -- cgit v1.2.3