Skip to content
Commit e8ed246d authored by Andre Werner's avatar Andre Werner Committed by Greg Kroah-Hartman
Browse files

serial: sc16is7xx: Fix IRQ number check behavior



The logical meaning of the previous version is wrong due to a typo.

If the IRQ equals 0, no interrupt pin is available and polling mode
shall be used.

Additionally, this fix adds a check for IRQ < 0 to increase robustness,
because documentation still says that negative IRQ values cannot be
absolutely ruled-out.

Fixes: 104c1b9d ("serial: sc16is7xx: Add polling mode if no IRQ pin is available")
Signed-off-by: default avatarAndre Werner <andre.werner@systec-electronic.com>
Reviewed-by: default avatarJiri Slaby <jirislaby@kernel.org>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarMaarten Brock <maarten.brock@sttls.nl>
Reviewed-by: default avatarHugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20250121071819.1346672-1-andre.werner@systec-electronic.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2014c95a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment