HID: playstation: sanity check DualSense calibration data.
authorRoderick Colenbrander <roderick@gaikai.com>
Fri, 6 Jan 2023 01:59:08 +0000 (17:59 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 06:59:00 +0000 (07:59 +0100)
commita54c5ad007ea6e19be1a88b6c3022a0cf12682eb
treeb40e5e914c087a5140166a9ba1be0ef3d5f623d8
parent6d7686cc11b76019db57f9b2dc555f4023d097a1
HID: playstation: sanity check DualSense calibration data.

[ Upstream commit ccf1e1626d37745d0a697db67407beec9ae9d4b8 ]

Make sure calibration values are defined to prevent potential kernel
crashes. This fixes a hypothetical issue for virtual or clone devices
inspired by a similar fix for DS4.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/hid-playstation.c