Patch "counter: ti-ecap-capture: Add check for clk_enable()" has been added to the 6.1-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

    counter: ti-ecap-capture: Add check for clk_enable()

to the 6.1-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:
     counter-ti-ecap-capture-add-check-for-clk_enable.patch
and it can be found in the queue-6.1 subdirectory.

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



commit feb8fa9fdb6ea1477ebb7760af2a354988524a3b
Author: Jiasheng Jiang <jiashengjiangcool@xxxxxxxxx>
Date:   Mon Nov 4 19:40:59 2024 +0000

    counter: ti-ecap-capture: Add check for clk_enable()
    
    [ Upstream commit 1437d9f1c56fce9c24e566508bce1d218dd5497a ]
    
    Add check for the return value of clk_enable() in order to catch the
    potential exception.
    
    Fixes: 4e2f42aa00b6 ("counter: ti-ecap-capture: capture driver support for ECAP")
    Reviewed-by: Julien Panis <jpanis@xxxxxxxxxxxx>
    Signed-off-by: Jiasheng Jiang <jiashengjiangcool@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20241104194059.47924-1-jiashengjiangcool@xxxxxxxxx
    Signed-off-by: William Breathitt Gray <wbg@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/counter/ti-ecap-capture.c b/drivers/counter/ti-ecap-capture.c
index fb1cb1774674a..b84e368a413f5 100644
--- a/drivers/counter/ti-ecap-capture.c
+++ b/drivers/counter/ti-ecap-capture.c
@@ -576,8 +576,13 @@ static int ecap_cnt_resume(struct device *dev)
 {
 	struct counter_device *counter_dev = dev_get_drvdata(dev);
 	struct ecap_cnt_dev *ecap_dev = counter_priv(counter_dev);
+	int ret;
 
-	clk_enable(ecap_dev->clk);
+	ret = clk_enable(ecap_dev->clk);
+	if (ret) {
+		dev_err(dev, "Cannot enable clock %d\n", ret);
+		return ret;
+	}
 
 	ecap_cnt_capture_set_evmode(counter_dev, ecap_dev->pm_ctx.ev_mode);
 




[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