Patch "scsi: ufs: ufs-mediatek: Fix error checking in ufs_mtk_init_va09_pwr_ctrl()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: ufs: ufs-mediatek: Fix error checking in ufs_mtk_init_va09_pwr_ctrl()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-ufs-ufs-mediatek-fix-error-checking-in-ufs_mtk_init_va09_pwr_ctrl.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 3ba880a12df5aa4488c18281701b5b1bc3d4531a Mon Sep 17 00:00:00 2001
From: Miaoqian Lin <linmq006@xxxxxxxxx>
Date: Wed, 22 Dec 2021 07:09:30 +0000
Subject: scsi: ufs: ufs-mediatek: Fix error checking in ufs_mtk_init_va09_pwr_ctrl()

From: Miaoqian Lin <linmq006@xxxxxxxxx>

commit 3ba880a12df5aa4488c18281701b5b1bc3d4531a upstream.

The function regulator_get() returns an error pointer. Use IS_ERR() to
validate the return value.

Link: https://lore.kernel.org/r/20211222070930.9449-1-linmq006@xxxxxxxxx
Fixes: cf137b3ea49a ("scsi: ufs-mediatek: Support VA09 regulator operations")
Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/scsi/ufs/ufs-mediatek.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -501,7 +501,7 @@ static void ufs_mtk_init_va09_pwr_ctrl(s
 	struct ufs_mtk_host *host = ufshcd_get_variant(hba);
 
 	host->reg_va09 = regulator_get(hba->dev, "va09");
-	if (!host->reg_va09)
+	if (IS_ERR(host->reg_va09))
 		dev_info(hba->dev, "failed to get va09");
 	else
 		host->caps |= UFS_MTK_CAP_VA09_PWR_CTRL;


Patches currently in stable-queue which might be from linmq006@xxxxxxxxx are

queue-5.15/usb-dwc3-qcom-fix-null-vs-is_err-checking-in-dwc3_qc.patch
queue-5.15/phy-mediatek-fix-missing-check-in-mtk_mipi_tx_probe.patch
queue-5.15/drivers-firmware-add-missing-platform_device_put-in-.patch
queue-5.15/scsi-ufs-ufs-mediatek-fix-error-checking-in-ufs_mtk_init_va09_pwr_ctrl.patch
queue-5.15/bluetooth-hci_qca-fix-null-vs-is_err_or_null-check-i.patch
queue-5.15/spi-spi-meson-spifc-add-missing-pm_runtime_disable-i.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux