Patch "clk: mmp: pxa1908-apbc: Fix NULL vs IS_ERR() check" has been added to the 6.13-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: mmp: pxa1908-apbc: Fix NULL vs IS_ERR() check

to the 6.13-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-mmp-pxa1908-apbc-fix-null-vs-is_err-check.patch
and it can be found in the queue-6.13 subdirectory.

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



commit 62fd3bb2be10671cbcddbf9d2ad19738fed23626
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Wed Nov 20 20:18:38 2024 +0300

    clk: mmp: pxa1908-apbc: Fix NULL vs IS_ERR() check
    
    [ Upstream commit e5ca5d7b4d7c29246d957dc45d63610584ae3a54 ]
    
    The devm_kzalloc() function returns NULL on error, not error pointers.
    Fix the check.
    
    Fixes: 51ce55919273 ("clk: mmp: Add Marvell PXA1908 APBC driver")
    Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/d7078eb7-a7d6-4753-b453-8fce15245c34@stanley.mountain
    Acked-by: Duje Mihanović <duje.mihanovic@xxxxxxxx>
    Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/clk/mmp/clk-pxa1908-apbc.c b/drivers/clk/mmp/clk-pxa1908-apbc.c
index b93d084661985..3fd7b5e644f3b 100644
--- a/drivers/clk/mmp/clk-pxa1908-apbc.c
+++ b/drivers/clk/mmp/clk-pxa1908-apbc.c
@@ -96,8 +96,8 @@ static int pxa1908_apbc_probe(struct platform_device *pdev)
 	struct pxa1908_clk_unit *pxa_unit;
 
 	pxa_unit = devm_kzalloc(&pdev->dev, sizeof(*pxa_unit), GFP_KERNEL);
-	if (IS_ERR(pxa_unit))
-		return PTR_ERR(pxa_unit);
+	if (!pxa_unit)
+		return -ENOMEM;
 
 	pxa_unit->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pxa_unit->base))




[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