[PATCH v7 1/3] hwmon: emc2305: Fix fan channel index handling
Guenter Roeck
linux at roeck-us.net
Thu Apr 30 16:13:15 PDT 2026
On Wed, Apr 29, 2026 at 09:59:53AM +0300, florin.leotescu at oss.nxp.com wrote:
> From: Florin Leotescu <florin.leotescu at nxp.com>
>
> The fan channel index is used to access per-channel data structures.
> Validate the index against the number of available channels
> before use to prevent out-of-bounds access if an invalid
> value is provided.
>
> The thermal registration path currently uses a sequential child index,
> which may not match the validated channel from DT. Use the DT "reg"
> property when registering cooling devices to ensure consistent
> channel handling
>
> Signed-off-by: Florin Leotescu <florin.leotescu at nxp.com>
The problems found by Sashiko are real, but they are pre-existing.
The locking issues are pre-existing, and data->pwm_separate is for
all practical purposes always false (there is no upstream user of
the platform data, so it may well be removed), meaning there is no
separation of pwm channels if the thermal subsystem is enabled.
Given that, applied.
Thanks,
Guenter
More information about the linux-arm-kernel
mailing list