HID: nvidia-shield: Add missing check for input_ff_create_memless
BugLink: https://bugs.launchpad.net/bugs/2074091
[ Upstream commit 0a3f9f7fc59feb8a91a2793b8b60977895c72365 ]
Add check for the return value of input_ff_create_memless() and return
the error if it fails in order to catch the error.
Fixes: 09308562d4 ("HID: nvidia-shield: Initial driver implementation with Thunderstrike support")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
committed by
Roxana Nicolescu
parent
3923abcf64
commit
8ca3829556
@@ -283,7 +283,9 @@ static struct input_dev *shield_haptics_create(
|
||||
return haptics;
|
||||
|
||||
input_set_capability(haptics, EV_FF, FF_RUMBLE);
|
||||
input_ff_create_memless(haptics, NULL, play_effect);
|
||||
ret = input_ff_create_memless(haptics, NULL, play_effect);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
ret = input_register_device(haptics);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user