mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
usb: phy: fsl-usb: add IRQ check
[ Upstream commit ecc2f30dbb25969908115c81ec23650ed982b004 ]
The driver neglects to check the result of platform_get_irq()'s call and
blithely passes the negative error codes to request_irq() (which takes
*unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original
error code. Stop calling request_irq() with the invalid IRQ #s.
Fixes: 0807c500a1 ("USB: add Freescale USB OTG Transceiver driver")
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
9535f55d0c
commit
e1473ac285
1 changed files with 2 additions and 0 deletions
|
|
@ -873,6 +873,8 @@ int usb_otg_start(struct platform_device *pdev)
|
|||
|
||||
/* request irq */
|
||||
p_otg->irq = platform_get_irq(pdev, 0);
|
||||
if (p_otg->irq < 0)
|
||||
return p_otg->irq;
|
||||
status = request_irq(p_otg->irq, fsl_otg_isr,
|
||||
IRQF_SHARED, driver_name, p_otg);
|
||||
if (status) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue