Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usb: return error code when platform_get_irq fails
In function xhci_mtk_probe(), variable ret takes the return value. Its value should be negative on failures. However, when the call to function platform_get_irq() fails, it does not set the error code, and 0 will be returned. 0 indicates no error. As a result, the callers of function xhci_mtk_probe() will not be able to detect the error. This patch fixes the bug by assigning the return value of platform_get_irq() to variable ret if it fails. CC: <[email protected]> Signed-off-by: Pan Bian <[email protected]> Reviewed-by: Matthias Brugger <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information