]> git.baikalelectronics.ru Git - kernel.git/commit
HID: potential dereference of null pointer
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Wed, 15 Dec 2021 08:36:05 +0000 (16:36 +0800)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Mon, 20 Dec 2021 10:26:14 +0000 (11:26 +0100)
commitf50fdc1225e5de1a654da5af049a0e92fc2407b2
treee8d8117d177ba7e85e64a429febf490e49922e8d
parent424605dad23f1a979a260040ef7a880426ea7bf6
HID: potential dereference of null pointer

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: 7053d006b6d3 ("HID: add vivaldi HID driver")
Cc: stable@vger.kernel.org
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211215083605.117638-1-jiasheng@iscas.ac.cn
drivers/hid/hid-vivaldi.c