Re: [PATCH 5/5] Input: cros_ec_keyb - Defer probe until parent EC device is registered

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 28, 2025 at 08:36:01AM +0000, Tzung-Bi Shih wrote:
> The `cros_ec_keyb` driver can be probed before the cros_ec_device has
> completed the registration.  This creates a race condition where
> `cros_ec_keyb` might access uninitialized data.
> 
> Fix this by calling `cros_ec_device_registered()` to check the parent's
> status.  If the device is not yet ready, return -EPROBE_DEFER to ensure
> the probe is retried later.
> 
> Signed-off-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>

Acked-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>

Thanks.

-- 
Dmitry




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux