Skip to content
Commit b13de701 authored by Andy Lutomirski's avatar Andy Lutomirski Committed by Darren Hart
Browse files

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: default avatarJean Delvare <jdelvare@suse.de>
Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
Acked-by: default avatarPali Rohár <pali.rohar@gmail.com>
Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
parent a570af48
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment