diff options
author | Wentao Liang <vulab@iscas.ac.cn> | 2025-02-12 10:18:49 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-21 14:01:36 +0100 |
commit | 6ccb3bbdad671e0845f78916c79d6948850a6a7e (patch) | |
tree | db4babbde903698ec00e3c3a42a821a3c8123c44 /block/partitions | |
parent | 9f602c273faeee9274f9e5d7a61a8c519e1f5519 (diff) | |
download | linux-6ccb3bbdad671e0845f78916c79d6948850a6a7e.tar.gz linux-6ccb3bbdad671e0845f78916c79d6948850a6a7e.tar.bz2 linux-6ccb3bbdad671e0845f78916c79d6948850a6a7e.zip |
gpio: stmpe: Check return value of stmpe_reg_read in stmpe_gpio_irq_sync_unlock
commit b9644fbfbcab13da7f8b37bef7c51e5b8407d031 upstream.
The stmpe_reg_read function can fail, but its return value is not checked
in stmpe_gpio_irq_sync_unlock. This can lead to silent failures and
incorrect behavior if the hardware access fails.
This patch adds checks for the return value of stmpe_reg_read. If the
function fails, an error message is logged and the function returns
early to avoid further issues.
Fixes: b888fb6f2a27 ("gpio: stmpe: i2c transfer are forbiden in atomic context")
Cc: stable@vger.kernel.org # 4.16+
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20250212021849.275-1-vulab@iscas.ac.cn
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block/partitions')
0 files changed, 0 insertions, 0 deletions