Patch "soc: mediatek: mtk-svs: Enable the IRQ later" has been added to the 6.2-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

    soc: mediatek: mtk-svs: Enable the IRQ later

to the 6.2-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:
     soc-mediatek-mtk-svs-enable-the-irq-later.patch
and it can be found in the queue-6.2 subdirectory.

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



commit ccb6309af8e1d69935842b3e4590eb85fb96a4b8
Author: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
Date:   Tue Dec 20 22:35:59 2022 +0100

    soc: mediatek: mtk-svs: Enable the IRQ later
    
    [ Upstream commit b74952aba6c3f47e7f2c5165abaeefa44c377140 ]
    
    If the system does not come from reset (like when is booted via
    kexec()), the peripheral might triger an IRQ before the data structures
    are initialised.
    
    Fixes:
    
    [    0.227710] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000f08
    [    0.227913] Call trace:
    [    0.227918]  svs_isr+0x8c/0x538
    
    Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221127-mtk-svs-v2-0-145b07663ea8@xxxxxxxxxxxx
    Signed-off-by: Matthias Brugger <matthias.bgg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
index 0469c9dfeb04e..75b2f534aa9d0 100644
--- a/drivers/soc/mediatek/mtk-svs.c
+++ b/drivers/soc/mediatek/mtk-svs.c
@@ -2385,14 +2385,6 @@ static int svs_probe(struct platform_device *pdev)
 		goto svs_probe_free_resource;
 	}
 
-	ret = devm_request_threaded_irq(svsp->dev, svsp_irq, NULL, svs_isr,
-					IRQF_ONESHOT, svsp->name, svsp);
-	if (ret) {
-		dev_err(svsp->dev, "register irq(%d) failed: %d\n",
-			svsp_irq, ret);
-		goto svs_probe_free_resource;
-	}
-
 	svsp->main_clk = devm_clk_get(svsp->dev, "main");
 	if (IS_ERR(svsp->main_clk)) {
 		dev_err(svsp->dev, "failed to get clock: %ld\n",
@@ -2414,6 +2406,14 @@ static int svs_probe(struct platform_device *pdev)
 		goto svs_probe_clk_disable;
 	}
 
+	ret = devm_request_threaded_irq(svsp->dev, svsp_irq, NULL, svs_isr,
+					IRQF_ONESHOT, svsp->name, svsp);
+	if (ret) {
+		dev_err(svsp->dev, "register irq(%d) failed: %d\n",
+			svsp_irq, ret);
+		goto svs_probe_iounmap;
+	}
+
 	ret = svs_start(svsp);
 	if (ret) {
 		dev_err(svsp->dev, "svs start fail: %d\n", ret);



[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