Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 09308562d4af ("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>

authored by

Chen Ni and committed by
Jiri Kosina
0a3f9f7f 23604972

+3 -1
+3 -1
drivers/hid/hid-nvidia-shield.c
··· 283 283 return haptics; 284 284 285 285 input_set_capability(haptics, EV_FF, FF_RUMBLE); 286 - input_ff_create_memless(haptics, NULL, play_effect); 286 + ret = input_ff_create_memless(haptics, NULL, play_effect); 287 + if (ret) 288 + goto err; 287 289 288 290 ret = input_register_device(haptics); 289 291 if (ret)