Commit 0a3f9f7f authored by Chen Ni's avatar Chen Ni Committed by Jiri Kosina

HID: nvidia-shield: Add missing check for input_ff_create_memless

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: 09308562 ("HID: nvidia-shield: Initial driver implementation with Thunderstrike support")
Signed-off-by: default avatarChen Ni <nichen@iscas.ac.cn>
Reviewed-by: default avatarRahul Rameshbabu <rrameshbabu@nvidia.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent 23604972
...@@ -283,7 +283,9 @@ static struct input_dev *shield_haptics_create( ...@@ -283,7 +283,9 @@ static struct input_dev *shield_haptics_create(
return haptics; return haptics;
input_set_capability(haptics, EV_FF, FF_RUMBLE); 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); ret = input_register_device(haptics);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment