Blob Blame History Raw
From: Sergey Shtylyov <s.shtylyov@omprussia.ru>
Date: Mon, 29 Mar 2021 23:50:58 +0300
Subject: scsi: ufs: ufshcd-pltfrm: Fix deferred probing
Git-commit: 339c9b63cc7ce779ce45c675bf709cb58b807fc3
Patch-mainline: v5.13-rc1
References: bsc#1187631

The driver overrides the error codes returned by platform_get_irq() to
-ENODEV, so if it returns -EPROBE_DEFER, the driver would fail the probe
permanently instead of the deferred probing.  Propagate the error code
upstream as it should have been done from the start...

[lduncan: modified, since we have a dev_err() not present upstream]

Link: https://lore.kernel.org/r/420364ca-614a-45e3-4e35-0e0653c7bc53@omprussia.ru
Fixes: 2953f850c3b8 ("[SCSI] ufs: use devres functions for ufshcd")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Lee Duncan <lduncan@suse.com>
---
 drivers/scsi/ufs/ufshcd-pltfrm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -315,7 +315,7 @@ int ufshcd_pltfrm_init(struct platform_d
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
 		dev_err(dev, "IRQ resource not available\n");
-		err = -ENODEV;
+		err = irq;
 		goto out;
 	}