Patch "mmc: davinci_mmc: Handle error for clk_enable" has been added to the 5.17-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

    mmc: davinci_mmc: Handle error for clk_enable

to the 5.17-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:
     mmc-davinci_mmc-handle-error-for-clk_enable.patch
and it can be found in the queue-5.17 subdirectory.

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



commit bf741a3351dfccc3b3aabe7ab684e513c373e325
Author: Jiasheng Jiang <jiasheng@xxxxxxxxxxx>
Date:   Tue Mar 8 15:14:15 2022 +0800

    mmc: davinci_mmc: Handle error for clk_enable
    
    [ Upstream commit 09e7af76db02c74f2a339b3cb2d95460fa2ddbe4 ]
    
    As the potential failure of the clk_enable(),
    it should be better to check it and return error
    if fails.
    
    Fixes: bbce5802afc5 ("davinci: mmc: updates to suspend/resume implementation")
    Signed-off-by: Jiasheng Jiang <jiasheng@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220308071415.1093393-1-jiasheng@xxxxxxxxxxx
    Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index 2a757c88f9d2..80de660027d8 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1375,8 +1375,12 @@ static int davinci_mmcsd_suspend(struct device *dev)
 static int davinci_mmcsd_resume(struct device *dev)
 {
 	struct mmc_davinci_host *host = dev_get_drvdata(dev);
+	int ret;
+
+	ret = clk_enable(host->clk);
+	if (ret)
+		return ret;
 
-	clk_enable(host->clk);
 	mmc_davinci_reset_ctrl(host, 0);
 
 	return 0;



[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