Patch "clk: mediatek: fix unregister function in mtk_clk_register_dividers cleanup" has been added to the 6.0-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

    clk: mediatek: fix unregister function in mtk_clk_register_dividers cleanup

to the 6.0-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:
     clk-mediatek-fix-unregister-function-in-mtk_clk_regi.patch
and it can be found in the queue-6.0 subdirectory.

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



commit b56c6018ce6eb8c4ba60f12f29ddf1c65714bbec
Author: Chen-Yu Tsai <wenst@xxxxxxxxxxxx>
Date:   Mon Sep 26 18:25:18 2022 +0800

    clk: mediatek: fix unregister function in mtk_clk_register_dividers cleanup
    
    [ Upstream commit 20f7a0dba9075fb0e3d645495bc24d7025b58de1 ]
    
    When the cleanup paths for the various clk register APIs in the MediaTek
    clk library were added, the one in the dividers type used the wrong type
    of unregister function. This would result in incorrect dereferencing of
    the clk pointer and freeing of invalid pointers.
    
    Fix this by switching to the correct type of clk unregistration call.
    
    Fixes: 3c3ba2ab0226 ("clk: mediatek: mtk: Implement error handling in register APIs")
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220926102523.2367530-2-wenst@xxxxxxxxxxxx
    Signed-off-by: Chen-Yu Tsai <wenst@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index 05a188c62119..9b82956260d3 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -393,7 +393,7 @@ int mtk_clk_register_dividers(const struct mtk_clk_divider *mcds, int num,
 		if (IS_ERR_OR_NULL(clk_data->hws[mcd->id]))
 			continue;
 
-		mtk_clk_unregister_composite(clk_data->hws[mcd->id]);
+		clk_hw_unregister_divider(clk_data->hws[mcd->id]);
 		clk_data->hws[mcd->id] = ERR_PTR(-ENOENT);
 	}
 



[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