]> git.baikalelectronics.ru Git - kernel.git/commit
pata_ipx4xx_cf: fix IRQ check
authorSergey Shtylyov <s.shtylyov@omprussia.ru>
Thu, 25 Mar 2021 20:51:10 +0000 (23:51 +0300)
committerJens Axboe <axboe@kernel.dk>
Fri, 26 Mar 2021 23:13:02 +0000 (17:13 -0600)
commit0b1277737d2550af1bca2cba4e99c320b2df673e
tree5b780f6b64c6d4044e1e929a67911dc2202725b8
parent22a4ebcaaaf31268d062bf50e5e6e7f80daded82
pata_ipx4xx_cf: fix IRQ check

The driver's probe() method is written as if platform_get_irq() returns 0
on error, while actually it returns a negative error code (with all the
other values considered valid IRQs).  Rewrite the driver's IRQ checking
code to pass the positive IRQ #s to ata_host_activate(), propagate errors
upstream, and treat IRQ0 as error, returning -EINVAL, as the libata code
treats 0  as  an indication that polling should be used anyway...

Fixes: 9dc1d3238181 ("[libata] ARM: add ixp4xx PATA driver")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ata/pata_ixp4xx_cf.c