]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: phy: tahvo: add IRQ check
authorSergey Shtylyov <s.shtylyov@omp.ru>
Fri, 13 Aug 2021 20:32:38 +0000 (23:32 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:40 +0000 (09:50 +0200)
commit494629ba62a961de1f2dd0b7125878acb27b8043
tree727af61e47648c4d5395d6119cfedc4418e0ee94
parent46638d6941ee55fec7a8c62abdb7cece0e231fe8
usb: phy: tahvo: add IRQ check

[ Upstream commit 0d45a1373e669880b8beaecc8765f44cb0241e47 ]

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

Fixes: 9ba96ae5074c ("usb: omap1: Tahvo USB transceiver driver")
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Link: https://lore.kernel.org/r/8280d6a4-8e9a-7cfe-1aa9-db586dc9afdf@omp.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/phy/phy-tahvo.c