]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
usb: dwc3: meson-g12a: add IRQ check
authorSergey Shtylyov <s.shtylyov@omp.ru>
Mon, 9 Aug 2021 20:21:14 +0000 (23:21 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 15 Oct 2021 09:27:07 +0000 (11:27 +0200)
commit1380263f18369112f57180d77e31bc51bca2cd14
tree7049ae578617d1cdbb320fb4848973784ebb0705
parente81586fa65d109be7681af4e57bfe86f8953f8d4
usb: dwc3: meson-g12a: add IRQ check

BugLink: https://bugs.launchpad.net/bugs/1946788
[ Upstream commit baa2986bda3f7b2386607587a4185e3dff8f98df ]

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

Fixes: f90db10779ad ("usb: dwc3: meson-g12a: Add support for IRQ based OTG switching")
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Link: https://lore.kernel.org/r/96106462-5538-0b2f-f2ab-ee56e4853912@omp.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/usb/dwc3/dwc3-meson-g12a.c