]> git.baikalelectronics.ru Git - kernel.git/commit
HID: amd_sfh: Fix potential NULL pointer dereference
authorBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Thu, 23 Sep 2021 12:29:27 +0000 (17:59 +0530)
committerJiri Kosina <jkosina@suse.cz>
Mon, 27 Sep 2021 08:00:43 +0000 (10:00 +0200)
commit6b088954edafcb94c3eb65fc78309d750ade8e7d
tree7ed29ed1e328189099779f462a969a7c88e7117d
parentd397672a1d02343696c50f4fa1ddbf91fe379f49
HID: amd_sfh: Fix potential NULL pointer dereference

The cl_data field of a privdata must be allocated and updated before
using in amd_sfh_hid_client_init() function.

Hence handling NULL pointer cl_data accordingly.

Fixes: 2757af300a78 ("HID: amd_sfh: Fix potential NULL pointer dereference")
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c