]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
counter: 104-quad-8: Fix incorrect return value in IRQ handler
authorHaotian Zhang <vulab@iscas.ac.cn>
Mon, 15 Dec 2025 02:01:14 +0000 (10:01 +0800)
committerWilliam Breathitt Gray <wbg@kernel.org>
Mon, 22 Dec 2025 11:03:23 +0000 (20:03 +0900)
commit9517d76dd160208b7a432301ce7bec8fc1ddc305
tree64e46ab53abbb28cc9b34f5a8f8035cdbf4e55ed
parent23f9485510c338476b9735d516c1d4aacb810d46
counter: 104-quad-8: Fix incorrect return value in IRQ handler

quad8_irq_handler() should return irqreturn_t enum values, but it
directly returns negative errno codes from regmap operations on error.

Return IRQ_NONE if the interrupt status cannot be read. If clearing the
interrupt fails, return IRQ_HANDLED to prevent the kernel from disabling
the IRQ line due to a spurious interrupt storm. Also, log these regmap
failures with dev_WARN_ONCE.

Fixes: 98ffe0252911 ("counter: 104-quad-8: Migrate to the regmap API")
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20251215020114.1913-1-vulab@iscas.ac.cn
Cc: stable@vger.kernel.org
Signed-off-by: William Breathitt Gray <wbg@kernel.org>
drivers/counter/104-quad-8.c