diff options
author | Robert Zieba <[email protected]> | 2022-12-29 17:47:38 +0800 |
---|---|---|
committer | Tzung-Bi Shih <[email protected]> | 2023-01-05 23:27:14 +0800 |
commit | 01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9 (patch) | |
tree | e1b52572575a72eb78fe651099d2f5d2962e993a /drivers/platform/chrome/cros_ec_proto_test.c | |
parent | f9bce00f78ed9ff9c38130388c13a2b2b72b857e (diff) |
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: 04a8bdd135cc ("platform/chrome: cros_ec_uart: Add transport layer")
Signed-off-by: Robert Zieba <[email protected]>
[tzungbi: modified commit message and fixed context conflict.]
Signed-off-by: Tzung-Bi Shih <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/platform/chrome/cros_ec_proto_test.c')
0 files changed, 0 insertions, 0 deletions