kernel-fxtec-pro1x/drivers/platform/chrome
Enrico Granata a357310a57 platform/chrome: cros_ec_proto: check for NULL transfer function
[ Upstream commit 94d4e7af14a1170e34cf082d92e4c02de9e9fb88 ]

As new transfer mechanisms are added to the EC codebase, they may
not support v2 of the EC protocol.

If the v3 initial handshake transfer fails, the kernel will try
and call cmd_xfer as a fallback. If v2 is not supported, cmd_xfer
will be NULL, and the code will end up causing a kernel panic.

Add a check for NULL before calling the transfer function, along
with a helpful comment explaining how one might end up in this
situation.

Signed-off-by: Enrico Granata <egranata@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-15 11:54:08 +02:00
..
chromeos_laptop.c platform/chrome: chromeos_laptop: fix touchpad button mapping on Celes 2018-05-29 15:11:04 -07:00
chromeos_pstore.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
chromeos_tbmc.c platform/chrome: chromeos_tbmc - fix SPDX identifier 2018-06-16 16:52:59 -07:00
cros_ec_debugfs.c mfd: cros_ec: Don't try to grab log when suspended 2018-05-29 09:10:39 +01:00
cros_ec_i2c.c platform/chrome: Move cros-ec transport drivers to drivers/platform. 2018-07-03 12:40:06 -07:00
cros_ec_lightbar.c platform/chrome: Use to_cros_ec_dev more broadly 2018-05-30 11:53:40 -07:00
cros_ec_lpc.c platform/chrome: cros_ec_lpc: do not try DMI match when ACPI device found 2018-05-22 16:46:13 -07:00
cros_ec_lpc_mec.c platform/chrome: cros_ec_lpc: Add support for mec1322 EC 2017-06-23 16:12:01 -07:00
cros_ec_lpc_reg.c platform/chrome: cros_ec_lpc: Add support for mec1322 EC 2017-06-23 16:12:01 -07:00
cros_ec_proto.c platform/chrome: cros_ec_proto: check for NULL transfer function 2019-06-15 11:54:08 +02:00
cros_ec_spi.c platform/chrome: Move cros-ec transport drivers to drivers/platform. 2018-07-03 12:40:06 -07:00
cros_ec_sysfs.c platform/chrome: Use to_cros_ec_dev more broadly 2018-05-30 11:53:40 -07:00
cros_ec_vbc.c platform/chrome: Use to_cros_ec_dev more broadly 2018-05-30 11:53:40 -07:00
cros_kbd_led_backlight.c platform/chrome: Add Chrome OS keyboard backlight LEDs support 2016-05-11 11:55:47 -07:00
Kconfig platform/chrome: Move cros-ec transport drivers to drivers/platform. 2018-07-03 12:40:06 -07:00
Makefile platform/chrome: Move cros-ec transport drivers to drivers/platform. 2018-07-03 12:40:06 -07:00