HID: potential dereference of null pointer
stable inclusion from stable-v5.10.89 commit ef2dce43257df7488feb046de4706b9d657a4ad5 bugzilla: 186140 https://gitee.com/openeuler/kernel/issues/I4S8HA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ef2dce43257df7488feb046de4706b9d657a4ad5 -------------------------------- commit 13251ce1 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: 14c9c014 ("HID: add vivaldi HID driver") Cc: stable@vger.kernel.org Signed-off-by: NJiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Link: https://lore.kernel.org/r/20211215083605.117638-1-jiasheng@iscas.ac.cnSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录