summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorEnrico Granata <egranata@chromium.org>2019-04-03 15:40:36 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-15 11:54:55 +0200
commit9c8ace787b6f4bccc25eb2da7ada7c879d756bf2 (patch)
treeb5ebdcec6bb79998b4d5947c1ca38f2110a0289a /drivers/pci
parent147ee2cc1044c5cc8663cd19c78e356b521574d7 (diff)
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>
Diffstat (limited to 'drivers/pci')
0 files changed, 0 insertions, 0 deletions