Hello Christophe JAILLET, The patch 1995f15590ca: "firmware: stratix10-svc: Fix a potential resource leak in svc_create_memory_pool()" from Jun 13, 2023, leads to the following Smatch static checker warning: drivers/firmware/stratix10-svc.c:759 svc_create_memory_pool() warn: 'va' is an error pointer or valid drivers/firmware/stratix10-svc.c 738 static struct gen_pool * 739 svc_create_memory_pool(struct platform_device *pdev, 740 struct stratix10_svc_sh_memory *sh_memory) 741 { 742 struct device *dev = &pdev->dev; 743 struct gen_pool *genpool; 744 unsigned long vaddr; 745 phys_addr_t paddr; 746 size_t size; 747 phys_addr_t begin; 748 phys_addr_t end; 749 void *va; 750 size_t page_mask = PAGE_SIZE - 1; 751 int min_alloc_order = 3; 752 int ret; 753 754 begin = roundup(sh_memory->addr, PAGE_SIZE); 755 end = rounddown(sh_memory->addr + sh_memory->size, PAGE_SIZE); 756 paddr = begin; 757 size = end - begin; 758 va = devm_memremap(dev, paddr, size, MEMREMAP_WC); --> 759 if (!va) { This should be IS_ERR(). 760 dev_err(dev, "fail to remap shared memory\n"); 761 return ERR_PTR(-EINVAL); 762 } Older warnings to consider: drivers/firmware/stratix10-svc.c:956 stratix10_svc_send() warn: inconsistent indenting drivers/firmware/stratix10-svc.c:1233 stratix10_svc_drv_probe() warn: devm_ variable is still on list 'controller' (see line 1231) (use after free) regards, dan carpenter