]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2026 15:35:12 +0000 (16:35 +0100)
commit844f521604bdef93fd3b648673e75528d8e9ef78
treee1f554988296ce853dfd7661e7d32a793faf5a59
parenta0b28dd06a9a754da0f0fcb94296e92048e6f911
counter: 104-quad-8: Fix incorrect return value in IRQ handler

commit 9517d76dd160208b7a432301ce7bec8fc1ddc305 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/counter/104-quad-8.c