This is a note to let you know that I've just added the patch titled Input: gscps2 - check return value of ioremap() in gscps2_probe() to the 5.19-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: input-gscps2-check-return-value-of-ioremap-in-gscps2_probe.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From e61b3125a4f036b3c6b87ffd656fc1ab00440ae9 Mon Sep 17 00:00:00 2001 From: Xie Shaowen <studentxswpy@xxxxxxx> Date: Tue, 2 Aug 2022 15:20:33 +0800 Subject: Input: gscps2 - check return value of ioremap() in gscps2_probe() From: Xie Shaowen <studentxswpy@xxxxxxx> commit e61b3125a4f036b3c6b87ffd656fc1ab00440ae9 upstream. The function ioremap() in gscps2_probe() can fail, so its return value should be checked. Fixes: 4bdc0d676a643 ("remove ioremap_nocache and devm_ioremap_nocache") Cc: <stable@xxxxxxxxxxxxxxx> # v5.6+ Reported-by: Hacash Robot <hacashRobot@xxxxxxxxxxx> Signed-off-by: Xie Shaowen <studentxswpy@xxxxxxx> Signed-off-by: Helge Deller <deller@xxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/input/serio/gscps2.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c @@ -350,6 +350,10 @@ static int __init gscps2_probe(struct pa ps2port->port = serio; ps2port->padev = dev; ps2port->addr = ioremap(hpa, GSC_STATUS + 4); + if (!ps2port->addr) { + ret = -ENOMEM; + goto fail_nomem; + } spin_lock_init(&ps2port->lock); gscps2_reset(ps2port); Patches currently in stable-queue which might be from studentxswpy@xxxxxxx are queue-5.19/input-gscps2-check-return-value-of-ioremap-in-gscps2_probe.patch