summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorQingshuang Fu <fuqingshuang@kylinos.cn>2026-08-04 15:48:42 +0800
committerGuenter Roeck <linux@roeck-us.net>2026-08-04 14:07:58 -0700
commitd533882ce1060866a590257f2c77ee23eabef5b8 (patch)
tree6d0d9af588f10f149661e2874eb1ac7297ce79c0 /tools/perf/scripts/python/export-to-postgresql.py
parent59bd68ab05a8f9c9a60b6ec44682084184803ff4 (diff)
hwmon: (nzxt-smart2) Check return value of init_device() in probe
The init_device() call in nzxt_smart2_hid_probe() can fail because it sends HID output reports to the hardware to detect fans and set the update interval. If the hardware is not responding or the HID reports fail, init_device() returns a negative error code. However, the return value was ignored, causing the probe to continue and register an hwmon device even though the device was never properly initialized. This leads to an inconsistent state where the driver reports stale data or blocks on wait queues that will never be woken. The same function's return value is already checked in the reset_resume() handler, confirming the author's intent that errors should be propagated. Note that this fix was not possible before commit 59d104b54b0b ("hwmon: (nzxt-smart2) Stop device IO before calling hid_hw_stop") because the out_hw_close error path was missing hid_device_io_stop(), which would have opened a use-after-free risk window. Fixes: 53e68c20aeb1 ("hwmon: add driver for NZXT RGB&Fan Controller/Smart Device v2.") Signed-off-by: Qingshuang Fu <fuqingshuang@kylinos.cn> Link: https://lore.kernel.org/r/20260804074842.505923-1-fffsqian@163.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions