platform/chrome: cros_ec_proto: drop BUG_ON() in cros_ec_get_host_event()
authorTzung-Bi Shih <tzungbi@kernel.org>
Fri, 13 May 2022 04:41:40 +0000 (12:41 +0800)
committerTzung-Bi Shih <tzungbi@kernel.org>
Mon, 16 May 2022 02:01:51 +0000 (10:01 +0800)
commit20a264c97bc8c17d3a7dd7e8d0f72dc57b02c75e
treef55f72040ed18329c207a1d0a25b0950af2428b8
parentc2dcb1b06053a1ccfb73fe84e7b54b92383401cc
platform/chrome: cros_ec_proto: drop BUG_ON() in cros_ec_get_host_event()

It is overkill to crash the kernel if the `ec_dev` doesn't support MKBP
event but gets called into cros_ec_get_host_event().

Drop the BUG_ON() and return error (0 in the case) instead.

Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20220513044143.1045728-5-tzungbi@kernel.org
drivers/platform/chrome/cros_ec_proto.c