Message ID | 420364ca-614a-45e3-4e35-0e0653c7bc53@omprussia.ru |
---|---|
State | New |
Headers | show |
Series | scsi: ufshcd-pltfrm: fix deferred probing | expand |
On Mon, 29 Mar 2021 23:50:58 +0300, Sergey Shtylyov wrote: > 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... Applied to 5.13/scsi-queue, thanks! [1/1] scsi: ufshcd-pltfrm: fix deferred probing https://git.kernel.org/mkp/scsi/c/339c9b63cc7c -- Martin K. Petersen Oracle Linux Engineering
Index: scsi/drivers/scsi/ufs/ufshcd-pltfrm.c =================================================================== --- scsi.orig/drivers/scsi/ufs/ufshcd-pltfrm.c +++ scsi/drivers/scsi/ufs/ufshcd-pltfrm.c @@ -377,7 +377,7 @@ int ufshcd_pltfrm_init(struct platform_d irq = platform_get_irq(pdev, 0); if (irq < 0) { - err = -ENODEV; + err = irq; goto out; }
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... Fixes: 2953f850c3b8 ("[SCSI] ufs: use devres functions for ufshcd") Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru> --- This patch is against the 'fixes' branch of Martin Petgersen's 'scsi.git' repo. drivers/scsi/ufs/ufshcd-pltfrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)