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)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 30 Sep 2021 08:08:03 +0000 (10:08 +0200)
commit601e6baaa21c40292a0135963eda7d9b0afb9674
treed80f1d1c0a7074b603ab653976ad03d27c325a98
parent38245d0340ea732057f69b957de609cec56cd061
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: d46ef750ed58 ("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