This is a note to let you know that I've just added the patch titled mfd: altera-sysmgr: Fix a mistake caused by resource_size conversion to the 5.15-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: mfd-altera-sysmgr-fix-a-mistake-caused-by-resource_s.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit f2eababb31e396fa723e1bf362abe739a496bc5a Author: Kai Song <songkai01@xxxxxxxxxx> Date: Wed Oct 6 22:19:26 2021 +0800 mfd: altera-sysmgr: Fix a mistake caused by resource_size conversion [ Upstream commit fae2570d629cdd72f0611d015fc4ba705ae5422b ] The resource_size defines that: res->end - res->start + 1; The origin original code is: sysmgr_config.max_register = res->end - res->start - 3; So, the correct fix is that: sysmgr_config.max_register = resource_size(res) - 4; Fixes: d12edf9661a4 ("mfd: altera-sysmgr: Use resource_size function on resource object") Signed-off-by: Kai Song <songkai01@xxxxxxxxxx> Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx> Link: https://lore.kernel.org/r/20211006141926.6120-1-songkai01@xxxxxxxxxx Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/mfd/altera-sysmgr.c b/drivers/mfd/altera-sysmgr.c index 20cb294c75122..5d3715a28b28e 100644 --- a/drivers/mfd/altera-sysmgr.c +++ b/drivers/mfd/altera-sysmgr.c @@ -153,7 +153,7 @@ static int sysmgr_probe(struct platform_device *pdev) if (!base) return -ENOMEM; - sysmgr_config.max_register = resource_size(res) - 3; + sysmgr_config.max_register = resource_size(res) - 4; regmap = devm_regmap_init_mmio(dev, base, &sysmgr_config); }