This is a note to let you know that I've just added the patch titled net: macb: fix an issue about leak related system resources to the 5.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: net-macb-fix-an-issue-about-leak-related-system-resources.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Tue 12 May 2020 10:55:24 AM CEST From: Dejin Zheng <zhengdejin5@xxxxxxxxx> Date: Sun, 3 May 2020 20:32:26 +0800 Subject: net: macb: fix an issue about leak related system resources From: Dejin Zheng <zhengdejin5@xxxxxxxxx> [ Upstream commit b959c77dac09348955f344104c6a921ebe104753 ] A call of the function macb_init() can fail in the function fu540_c000_init. The related system resources were not released then. use devm_platform_ioremap_resource() to replace ioremap() to fix it. Fixes: c218ad559020ff9 ("macb: Add support for SiFive FU540-C000") Cc: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> Reviewed-by: Yash Shah <yash.shah@xxxxxxxxxx> Suggested-by: Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx> Suggested-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> Signed-off-by: Dejin Zheng <zhengdejin5@xxxxxxxxx> Acked-by: Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/ethernet/cadence/macb_main.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -4054,15 +4054,9 @@ static int fu540_c000_clk_init(struct pl static int fu540_c000_init(struct platform_device *pdev) { - struct resource *res; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (!res) - return -ENODEV; - - mgmt->reg = ioremap(res->start, resource_size(res)); - if (!mgmt->reg) - return -ENOMEM; + mgmt->reg = devm_platform_ioremap_resource(pdev, 1); + if (IS_ERR(mgmt->reg)) + return PTR_ERR(mgmt->reg); return macb_init(pdev); } Patches currently in stable-queue which might be from zhengdejin5@xxxxxxxxx are queue-5.4/net-macb-fix-an-issue-about-leak-related-system-resources.patch