diff mbox series

[v2] scsi: ufs: ti-j721e-ufs: Fix error return in ti_j721e_ufs_probe()

Message ID 20200806070135.67797-1-jingxiangfeng@huawei.com (mailing list archive)
State Mainlined
Commit 2138d1c918246e3d8193c3cb8b6d22d0bb888061
Headers show
Series [v2] scsi: ufs: ti-j721e-ufs: Fix error return in ti_j721e_ufs_probe() | expand

Commit Message

Jing Xiangfeng Aug. 6, 2020, 7:01 a.m. UTC
Fix to return error code PTR_ERR() from the error handling case instead
of 0.

Fixes: 22617e216331 ("scsi: ufs: ti-j721e-ufs: Fix unwinding of pm_runtime changes")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 drivers/scsi/ufs/ti-j721e-ufs.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Avri Altman Aug. 6, 2020, 7:08 a.m. UTC | #1
> 
> Fix to return error code PTR_ERR() from the error handling case instead
> of 0.
> 
> Fixes: 22617e216331 ("scsi: ufs: ti-j721e-ufs: Fix unwinding of pm_runtime
> changes")
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Martin K. Petersen Aug. 18, 2020, 3:12 a.m. UTC | #2
On Thu, 6 Aug 2020 15:01:35 +0800, Jing Xiangfeng wrote:

> Fix to return error code PTR_ERR() from the error handling case instead
> of 0.

Applied to 5.9/scsi-fixes, thanks!

[1/1] scsi: ufs: ti-j721e-ufs: Fix error return in ti_j721e_ufs_probe()
      https://git.kernel.org/mkp/scsi/c/2138d1c91824
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ti-j721e-ufs.c b/drivers/scsi/ufs/ti-j721e-ufs.c
index 46bb905b4d6a..eafe0db98d54 100644
--- a/drivers/scsi/ufs/ti-j721e-ufs.c
+++ b/drivers/scsi/ufs/ti-j721e-ufs.c
@@ -38,6 +38,7 @@  static int ti_j721e_ufs_probe(struct platform_device *pdev)
 	/* Select MPHY refclk frequency */
 	clk = devm_clk_get(dev, NULL);
 	if (IS_ERR(clk)) {
+		ret = PTR_ERR(clk);
 		dev_err(dev, "Cannot claim MPHY clock.\n");
 		goto clk_err;
 	}