Re: [PATCH v1] platform/x86: classmate-laptop: Add missing NULL pointer checks

From: Ilpo Järvinen

Date: Wed Jan 28 2026 - 07:58:04 EST


On Mon, 26 Jan 2026 21:02:40 +0100, Rafael J. Wysocki wrote:

> In a few places in the Classmate laptop driver, code using the accel
> object may run before that object's address is stored in the driver
> data of the input device using it.
>
> For example, cmpc_accel_sensitivity_store_v4() is the "show" method
> of cmpc_accel_sensitivity_attr_v4 which is added in cmpc_accel_add_v4(),
> before calling dev_set_drvdata() for inputdev->dev. If the sysfs
> attribute is accessed prematurely, the dev_get_drvdata(&inputdev->dev)
> call in in cmpc_accel_sensitivity_store_v4() returns NULL which
> leads to a NULL pointer dereference going forward.
>
> [...]


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: classmate-laptop: Add missing NULL pointer checks
commit: fe747d7112283f47169e9c16e751179a9b38611e

--
i.