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

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



commit eea9f936a802211a56696cc83ef6003f0de0c697
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/staging/clocking-wizard/clk-xlnx-clock-wizard.c b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
index 39367712ef540..8c1934df70dea 100644
--- a/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
+++ b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
@@ -347,7 +347,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