Message ID | 20220513044143.1045728-5-tzungbi@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 20a264c97bc8c17d3a7dd7e8d0f72dc57b02c75e |
Headers | show |
Series | platform/chrome: get rid of BUG_ON() | expand |
diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c index 9ce3374846ff..ff767dccdf0f 100644 --- a/drivers/platform/chrome/cros_ec_proto.c +++ b/drivers/platform/chrome/cros_ec_proto.c @@ -817,7 +817,8 @@ u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev) { u32 host_event; - BUG_ON(!ec_dev->mkbp_event_supported); + if (!ec_dev->mkbp_event_supported) + return 0; if (ec_dev->event_data.event_type != EC_MKBP_EVENT_HOST_EVENT) return 0;