Patch "soc: renesas: renesas-soc: Release 'chipid' from ioremap()" has been added to the 6.2-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

    soc: renesas: renesas-soc: Release 'chipid' from ioremap()

to the 6.2-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:
     soc-renesas-renesas-soc-release-chipid-from-ioremap.patch
and it can be found in the queue-6.2 subdirectory.

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



commit 2da926cc69125a1e57160c32a199df8c6e87fb31
Author: Li Yang <lidaxian@xxxxxxxxxxx>
Date:   Fri Mar 31 17:55:44 2023 +0800

    soc: renesas: renesas-soc: Release 'chipid' from ioremap()
    
    [ Upstream commit fc187a46a8e682f0f1167b230792b88de01ceaa0 ]
    
    Smatch reports:
    
    drivers/soc/renesas/renesas-soc.c:536 renesas_soc_init() warn:
    'chipid' from ioremap() not released on lines: 475.
    
    If soc_dev_atrr allocation is failed, function renesas_soc_init()
    will return without releasing 'chipid' from ioremap().
    
    Fix this by adding function iounmap().
    
    Fixes: cb5508e47e60 ("soc: renesas: Add support for reading product revision for RZ/G2L family")
    Signed-off-by: Li Yang <lidaxian@xxxxxxxxxxx>
    Reviewed-by: Dan Carpenter <error27@xxxxxxxxx>
    Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20230331095545.31823-1-lidaxian@xxxxxxxxxxx
    Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/soc/renesas/renesas-soc.c b/drivers/soc/renesas/renesas-soc.c
index 468ebce1ea88b..51191d1a6dd1d 100644
--- a/drivers/soc/renesas/renesas-soc.c
+++ b/drivers/soc/renesas/renesas-soc.c
@@ -471,8 +471,11 @@ static int __init renesas_soc_init(void)
 	}
 
 	soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
-	if (!soc_dev_attr)
+	if (!soc_dev_attr) {
+		if (chipid)
+			iounmap(chipid);
 		return -ENOMEM;
+	}
 
 	np = of_find_node_by_path("/");
 	of_property_read_string(np, "model", &soc_dev_attr->machine);



[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