ata: libahci_platform: fix IRQ check
authorSergey Shtylyov <s.shtylyov@omprussia.ru>
Mon, 15 Mar 2021 20:15:06 +0000 (23:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 08:40:25 +0000 (10:40 +0200)
commit597a1cd2b5026f5b0a9cd78e01650a67ffd3b436
tree7a605ba085a70f5469810a891c1f85550dfe8b7e
parent48f03db225e16764664d650d9a205ceea8f3ae75
ata: libahci_platform: fix IRQ check

[ Upstream commit b30d0040f06159de97ad9c0b1536f47250719d7d ]

Iff platform_get_irq() returns 0, ahci_platform_init_host() would return 0
early (as if the call was successful). Override IRQ0 with -EINVAL instead
as the 'libata' regards 0 as "no IRQ" (thus polling) anyway...

Fixes: c034640a32f8 ("ata: libahci: properly propagate return value of platform_get_irq()")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
Link: https://lore.kernel.org/r/4448c8cc-331f-2915-0e17-38ea34e251c8@omprussia.ru
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ata/libahci_platform.c