[PATCH 3.16 058/233] usb: host: xhci-plat: propagate return value of platform_get_irq()

From: Ben Hutchings
Date: Sat Sep 09 2017 - 19:03:01 EST


3.16.48-rc1 review patch. If anyone has any objections, please let me know.

------------------

From: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
drivers/usb/host/xhci-plat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -109,7 +109,7 @@ static int xhci_plat_probe(struct platfo

irq = platform_get_irq(pdev, 0);
if (irq < 0)
- return -ENODEV;
+ return irq;

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)