dell-wmi: Clean up hotkey table size check
authorAndy Lutomirski <luto@kernel.org>
Mon, 15 Feb 2016 16:32:35 +0000 (08:32 -0800)
committerDarren Hart <dvhart@linux.intel.com>
Wed, 23 Mar 2016 17:05:45 +0000 (10:05 -0700)
commitb13de7019c1b67f0c1b987fc9fe82fcc371ba1d2
treec19747a3335a857e84e78d8ff0c3fa956a8876c3
parenta570af4850043260b87fb1b8aa27a4484e648878
dell-wmi: Clean up hotkey table size check

Checking the table for a minimum size of 7 bytes makes no sense: any valid
hotkey table has a size that's a multiple of 4.

Clean this up: replace the hardcoded header length with a sizeof and
change the check to ignore an empty hotkey table.  The only behavior
change is that a 7-byte table (which is nonsensical) will now be
treated as absent instead of as valid but empty.

Reported-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/dell-wmi.c
This page took 0.027701 seconds and 5 git commands to generate.