[lvc-project] [PATCH v2] hwmon: (asus-ec-sensors) add WARN_ONCE() on invalid sensor index

Eugene Shalygin eugene.shalygin at gmail.com
Mon Apr 28 10:11:45 MSK 2025


On Fri, 25 Apr 2025 at 22:00, Alexei Safin <a.safin at rosa.ru> wrote:
>
> Prevent undefined behavior by adding WARN_ONCE() when find_ec_sensor_index()
> returns a negative value.

I'm not sure about WARN_ONCE, does it bring anything useful? Clients
see the error in the return value, sensor reading is absent, do we
need to duplicate that in the log? Guenter, may I leave it up to you,
please?

Best regards,
Eugene



More information about the lvc-project mailing list