Skip to content
Commit 01f95d42 authored by Robert Zieba's avatar Robert Zieba Committed by Tzung-Bi Shih
Browse files

platform/chrome: cros_ec_uart: fix race condition



serdev_device_set_client_ops() is called before `ec_dev` is fully
initialized.  This can result in cros_ec_uart_rx_bytes() being called
while `ec_dev` is still not initialized, resulting in a kernel panic.

Call serdev_device_set_client_ops() after `ec_dev` is initialized.

Fixes: 04a8bdd1 ("platform/chrome: cros_ec_uart: Add transport layer")
Signed-off-by: default avatarRobert Zieba <robertzieba@google.com>
[tzungbi: modified commit message and fixed context conflict.]
Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20221229094738.2304044-1-tzungbi@kernel.org
parent f9bce00f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment