Patch "MIPS: BCM63xx: Add check for NULL for clk in clk_enable" has been added to the 4.14-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

    MIPS: BCM63xx: Add check for NULL for clk in clk_enable

to the 4.14-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:
     mips-bcm63xx-add-check-for-null-for-clk-in-clk_enabl.patch
and it can be found in the queue-4.14 subdirectory.

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



commit fd0302689c8b05e88fa87ea947612358061c6b4e
Author: Anastasia Belova <abelova@xxxxxxxxxxxxx>
Date:   Fri Dec 9 13:05:50 2022 +0300

    MIPS: BCM63xx: Add check for NULL for clk in clk_enable
    
    [ Upstream commit ee9ef11bd2a59c2fefaa0959e5efcdf040d7c654 ]
    
    Check clk for NULL before calling clk_enable_unlocked where clk
    is dereferenced. There is such check in other implementations
    of clk_enable.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.")
    Signed-off-by: Anastasia Belova <abelova@xxxxxxxxxxxxx>
    Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
    Acked-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
    Signed-off-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c
index 73f2534b9676..2f4b5978433d 100644
--- a/arch/mips/bcm63xx/clk.c
+++ b/arch/mips/bcm63xx/clk.c
@@ -317,6 +317,8 @@ static struct clk clk_periph = {
  */
 int clk_enable(struct clk *clk)
 {
+	if (!clk)
+		return 0;
 	mutex_lock(&clocks_mutex);
 	clk_enable_unlocked(clk);
 	mutex_unlock(&clocks_mutex);



[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