]> git.baikalelectronics.ru Git - kernel.git/commit
HID: amd_sfh: Add NULL check for hid device
authorBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Tue, 12 Jul 2022 18:18:26 +0000 (23:48 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:56 +0000 (14:23 +0200)
commitebda4d6aff93f7bde9e7b5c41460bb246feda2bf
tree6e64f000c81467273f768377c4c8edba8aaa89ff
parent826ee148b7413c6169b0cefeab85c44f738ee9cb
HID: amd_sfh: Add NULL check for hid device

[ Upstream commit 6c4ec0c4440529c1bf5db7c28f865bc4dbec6318 ]

On removal of hid device during SFH set report may cause NULL pointer
exception. Hence add NULL check for hid device before accessing.

Fixes: e3cc2aa00c0c ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)")
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/amd-sfh-hid/amd_sfh_hid.c