mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
usb: phy: twl6030: add IRQ checks
[ Upstream commit 0881e22c06e66af0b64773c91c8868ead3d01aa1 ]
The driver neglects to check the result of platform_get_irq()'s calls and
blithely passes the negative error codes to request_threaded_irq() (which
takes *unsigned* IRQ #), causing them both to fail with -EINVAL, overriding
an original error code. Stop calling request_threaded_irq() with the
invalid IRQ #s.
Fixes: c33fad0c37 ("usb: otg: Adding twl6030-usb transceiver driver for OMAP4430")
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Sergey Shtylyov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
e1473ac285
commit
30d9607bcd
1 changed files with 5 additions and 0 deletions
|
|
@ -348,6 +348,11 @@ static int twl6030_usb_probe(struct platform_device *pdev)
|
|||
twl->irq2 = platform_get_irq(pdev, 1);
|
||||
twl->linkstat = MUSB_UNKNOWN;
|
||||
|
||||
if (twl->irq1 < 0)
|
||||
return twl->irq1;
|
||||
if (twl->irq2 < 0)
|
||||
return twl->irq2;
|
||||
|
||||
twl->comparator.set_vbus = twl6030_set_vbus;
|
||||
twl->comparator.start_srp = twl6030_start_srp;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue