]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 08:00:46 +0000 (10:00 +0200)
commit44646047df0359c6b0b440556d021742c06d1b74
tree6d33a3aad50aaa591773d0b6997319c2b1ddb5f1
parentb2685984f700814af825d2f114c7aae124b50dc6
usb: dwc3: meson-g12a: add IRQ check

[ 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>
drivers/usb/dwc3/dwc3-meson-g12a.c