In the Linux kernel, the following vulnerability has been resolved: iio: light: ltrf216a: fix runtime PM reference leak in error path ltrf216a_get_lux() acquires a runtime PM reference by calling ltrf216a_set_power_state(data, true). Однако, если ltrf216a_read_data() терпит неудачу, функция немедленно возвращается, не опуская ссылку. Это оставляет время выполнения PM неуравновешенным, предотвращая автоматическое приостановление устройства после неудачного чтения.
Исправьте это, выпустив ссылку на время выполнения PM перед возвращением с пути ошибки.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: iio: light: ltrf216a: fix runtime PM reference leak in error path ltrf216a_get_lux() acquires a runtime PM reference by calling ltrf216a_set_power_state(data, true). However, if ltrf216a_read_data() fails, the function returns immediately without dropping the reference. This leaves the runtime PM usage count unbalanced, preventing the device from autosuspending after a failed read. Fix this by releasing the runtime PM reference before returning from the error path.