Re: [PATCH v2] platform/x86: bitland-mifs-wmi: Fix NULL pointer dereference during suspend/resume

From: Ilpo Järvinen

Date: Fri Jul 03 2026 - 09:52:08 EST


On Wed, 01 Jul 2026 20:01:39 +0800, Mingyou Chen wrote:

> The driver registers two distinct WMI devices: a control device
> (BITLAND_WMI_CONTROL) and an event device (BITLAND_WMI_EVENT). During
> the probe phase, the event device handling path returns early before
> initializing the platform profile device (data->pp_dev), leaving it
> NULL.
>
> However, the PM sleep operations are registered globally for the WMI
> driver
> and are triggered for both devices. When entering suspend, the event
> device
> invokes bitland_mifs_wmi_suspend(), which passes the uninitialized
> data->pp_dev (NULL) into laptop_profile_get(). This leads to a NULL
> pointer
> dereference inside dev_get_drvdata(), causing a kernel Oops and halting
> the
> suspend sequence.
>
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo-fixes branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: bitland-mifs-wmi: Fix NULL pointer dereference during suspend/resume
commit: d3666875c75eb1bc8090343fa0d6fc8fb7924356

--
i.