]> git.baikalelectronics.ru Git - kernel.git/commit
cros_ec: fix nul-termination for firmware build info
authorArnd Bergmann <arnd@arndb.de>
Mon, 4 Dec 2017 14:49:48 +0000 (15:49 +0100)
committerBenson Leung <bleung@chromium.org>
Sat, 16 Dec 2017 05:07:17 +0000 (21:07 -0800)
commit9f22aa0fcd9cccc7da21814b1ad29847d4a19640
treefe6fa1b0ee2f3ee31a4602d930d6d69d6e1daf42
parent7fc093c276d8d932e70eaa207b58af3b3c06d267
cros_ec: fix nul-termination for firmware build info

As gcc-8 reports, we zero out the wrong byte:

drivers/platform/chrome/cros_ec_sysfs.c: In function 'show_ec_version':
drivers/platform/chrome/cros_ec_sysfs.c:190:12: error: array subscript 4294967295 is above array bounds of 'uint8_t[]' [-Werror=array-bounds]

This changes the code back to what it did before changing to a
zero-length array structure.

Fixes: 75cf7f98bebe ("mfd: cros_ec: Use a zero-length array for command data")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benson Leung <bleung@chromium.org>
drivers/platform/chrome/cros_ec_sysfs.c