]> git.baikalelectronics.ru Git - kernel.git/commit
pata_octeon_cf: avoid WARN_ON() in ata_host_activate()
authorSergey Shtylyov <s.shtylyov@omp.ru>
Tue, 18 May 2021 20:38:54 +0000 (23:38 +0300)
committerJens Axboe <axboe@kernel.dk>
Wed, 19 May 2021 21:54:42 +0000 (15:54 -0600)
commit1abe0c37e146b1d836ca398c04f0e9b2eb4271cc
tree6ef313bd20be47d697e5ad5a0fb37799fdabcaa2
parentd6a9b81f11f6e5b6daead1edaf6e88589ac2a308
pata_octeon_cf: avoid WARN_ON() in ata_host_activate()

Iff platform_get_irq() fails (or returns IRQ0) and thus the polling mode
has to be used, ata_host_activate() hits the WARN_ON() due to 'irq_handler'
parameter being non-NULL if the polling mode is selected.  Let's only set
the pointer to the driver's IRQ handler if platform_get_irq() returns a
valid IRQ # -- this should avoid the unnecessary WARN_ON()...

Fixes: ea473861584c ("MIPS/OCTEON/ata: Convert pata_octeon_cf.c to use device tree.")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Link: https://lore.kernel.org/r/3a241167-f84d-1d25-5b9b-be910afbe666@omp.ru
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ata/pata_octeon_cf.c