scsi: jazz_esp: Add IRQ check
authorSergey Shtylyov <s.shtylyov@omprussia.ru>
Tue, 30 Mar 2021 17:43:23 +0000 (20:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 07:50:27 +0000 (09:50 +0200)
commit18e729d21f26fd7e4c719de39d6efc8b074e71ff
tree55c7fdf75b8a27037267e5f9a84d3a7f321b668e
parent7d81167e513fa15d41a9bdadb7436e8ef7fc01b9
scsi: jazz_esp: Add IRQ check

[ Upstream commit 38fca15c29db6ed06e894ac194502633e2a7d1fb ]

The driver neglects to check the result of platform_get_irq()'s call and
blithely passes the negative error codes to request_irq() (which takes
*unsigned* IRQ #), causing it to fail with -EINVAL, overriding the real
error code.  Stop calling request_irq() with the invalid IRQ #s.

Link: https://lore.kernel.org/r/594aa9ae-2215-49f6-f73c-33bd38989912@omprussia.ru
Fixes: 352e921f0dd4 ("[SCSI] jazz_esp: converted to use esp_core")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/jazz_esp.c