]> git.hungrycats.org Git - linux/commitdiff
usb: host: xhci-plat: propagate return value of platform_get_irq()
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 17 May 2017 15:32:06 +0000 (18:32 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 12:17:58 +0000 (14:17 +0200)
commit 4b148d5144d64ee135b8924350cb0b3a7fd21150 upstream.

platform_get_irq() returns an error code, but the xhci-plat driver
ignores it and always returns -ENODEV. This is not correct, and
prevents -EPROBE_DEFER from being propagated properly.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-plat.c

index 8788799538ebc5635a1e6401d3e57a96e6962080..54941bd3fe09b7cd07cbf8a02bb0bc416d7eeb61 100644 (file)
@@ -81,7 +81,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
 
        irq = platform_get_irq(pdev, 0);
        if (irq < 0)
-               return -ENODEV;
+               return irq;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!res)