summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-ring.c
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2017-01-03 18:28:45 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-03 17:37:32 +0100
commit28bedb5ae463b9f7e5195cbc93f1795e374bdef8 (patch)
tree1c8cf2055fb8a766f68759cad4ce6bdbc46177ce /drivers/usb/host/xhci-ring.c
parent90797aee5d6902b49a453c97d83c326408aeb5a8 (diff)
downloadop-kernel-dev-28bedb5ae463b9f7e5195cbc93f1795e374bdef8.zip
op-kernel-dev-28bedb5ae463b9f7e5195cbc93f1795e374bdef8.tar.gz
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: <stable@vger.kernel.org> Signed-off-by: Pan Bian <bianpan2016@163.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud