Patch "clk: clocking-wizard: Fix Oops in clk_wzrd_register_divider()" has been added to the 6.4-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: clocking-wizard: Fix Oops in clk_wzrd_register_divider()

to the 6.4-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-clocking-wizard-fix-oops-in-clk_wzrd_register_di.patch
and it can be found in the queue-6.4 subdirectory.

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



commit 725d8a8d0d2ffd855a009f7191aed85f4cd6c932
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Thu May 11 20:01:20 2023 +0300

    clk: clocking-wizard: Fix Oops in clk_wzrd_register_divider()
    
    [ Upstream commit 9c632a6396505a019ea6d12b5ab45e659a542a93 ]
    
    Smatch detected this potential error pointer dereference
    clk_wzrd_register_divider().  If devm_clk_hw_register() fails then
    it sets "hw" to an error pointer and then dereferences it on the
    next line.  Return the error directly instead.
    
    Fixes: 5a853722eb32 ("staging: clocking-wizard: Add support for dynamic reconfiguration")
    Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/f0e39b5c-4554-41e0-80d9-54ca3fabd060@kili.mountain
    Reviewed-by: Michal Simek <michal.simek@xxxxxxx>
    Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
index e83f104fad029..16df34f46280f 100644
--- a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
+++ b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
@@ -525,7 +525,7 @@ static struct clk *clk_wzrd_register_divider(struct device *dev,
 	hw = &div->hw;
 	ret = devm_clk_hw_register(dev, hw);
 	if (ret)
-		hw = ERR_PTR(ret);
+		return ERR_PTR(ret);
 
 	return hw->clk;
 }



[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