Patch "scsi: ufs: Uninitialized variable in ufshcd_devfreq_target()" has been added to the 6.7-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: Uninitialized variable in ufshcd_devfreq_target()

to the 6.7-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-uninitialized-variable-in-ufshcd_devfreq_ta.patch
and it can be found in the queue-6.7 subdirectory.

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



commit dc6de3cc62c31695238cbf2ba3924aa16cf17e6a
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Tue Feb 13 21:08:09 2024 +0300

    scsi: ufs: Uninitialized variable in ufshcd_devfreq_target()
    
    [ Upstream commit f2dced9d1992824d677593072bc20eccf66ac5d5 ]
    
    There is one goto where "sched_clk_scaling_suspend_work" is true but
    "scale_up" is uninitialized.  It leads to a Smatch uninitialized variable
    warning:
    
    drivers/ufs/core/ufshcd.c:1589 ufshcd_devfreq_target() error: uninitialized symbol 'scale_up'.
    
    Fixes: 1d969731b87f ("scsi: ufs: core: Only suspend clock scaling if scaling down")
    Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/c787d37f-1107-4512-8991-bccf80e74a35@moroto.mountain
    Reviewed-by: Peter Wang <peter.wang@xxxxxxxxxxxx>
    Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index e197b9828c3c3..d2d760143ca30 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -1456,7 +1456,7 @@ static int ufshcd_devfreq_target(struct device *dev,
 	int ret = 0;
 	struct ufs_hba *hba = dev_get_drvdata(dev);
 	ktime_t start;
-	bool scale_up, sched_clk_scaling_suspend_work = false;
+	bool scale_up = false, sched_clk_scaling_suspend_work = false;
 	struct list_head *clk_list = &hba->clk_list_head;
 	struct ufs_clk_info *clki;
 	unsigned long irq_flags;




[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