]> git.baikalelectronics.ru Git - kernel.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:47:35 +0000 (09:47 +0200)
commit558187113146071c13a5966b6c67e7f9177d45ac
tree35a8e17ec5f816d9a653b67ebaf6ef3efc0be42d
parentd08cecf1b209892292a6e09e71c8ddbb55935391
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: 36ec706b9e82 ("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