]> 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)
commit6e7f49f47b69daaed9dcc6fc22ddba7c07da466b
tree7ed29ed1e328189099779f462a969a7c88e7117d
parentb0724aa10e1f163fc0b15dafb5a210dba771b87d
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: a8f477b9ac1d ("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