Re: [PATCH v2] hwmon: (ntc_thermistor) return error instead of clipping on OOB

From: Guenter Roeck
Date: Fri Mar 07 2025 - 09:58:40 EST


On Fri, Mar 07, 2025 at 09:10:43AM +0100, Maud Spierings via B4 Relay wrote:
> From: Maud Spierings <maudspierings@xxxxxxxxxxxxxx>
>
> When the ntc is reading Out Of Bounds instead of clipping to the nearest
> limit (min/max) return -ENODATA. This prevents malfunctioning sensors
> from sending a device into a shutdown loop due to a critical trip.
>
> This implementation will only work for ntc type thermistors if a ptc
> type is to be implemented the min/max ohm calculation must be adjusted
> to take that into account.
>
> Signed-off-by: Maud Spierings <maudspierings@xxxxxxxxxxxxxx>

Applied.

Thanks,
Guenter