This is a note to let you know that I've just added the patch titled HID: potential dereference of null pointer 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: hid-potential-dereference-of-null-pointer.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. >From 13251ce1dd9bb525da2becb9b26fdfb94ca58659 Mon Sep 17 00:00:00 2001 From: Jiasheng Jiang <jiasheng@xxxxxxxxxxx> Date: Wed, 15 Dec 2021 16:36:05 +0800 Subject: HID: potential dereference of null pointer From: Jiasheng Jiang <jiasheng@xxxxxxxxxxx> commit 13251ce1dd9bb525da2becb9b26fdfb94ca58659 upstream. The return value of devm_kzalloc() needs to be checked. To avoid hdev->dev->driver_data to be null in case of the failure of alloc. Fixes: 14c9c014babe ("HID: add vivaldi HID driver") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Jiasheng Jiang <jiasheng@xxxxxxxxxxx> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx> Link: https://lore.kernel.org/r/20211215083605.117638-1-jiasheng@xxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/hid/hid-vivaldi.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/hid/hid-vivaldi.c +++ b/drivers/hid/hid-vivaldi.c @@ -57,6 +57,9 @@ static int vivaldi_probe(struct hid_devi int ret; drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL); + if (!drvdata) + return -ENOMEM; + hid_set_drvdata(hdev, drvdata); ret = hid_parse(hdev); Patches currently in stable-queue which might be from jiasheng@xxxxxxxxxxx are queue-5.15/hid-potential-dereference-of-null-pointer.patch