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

HID: pidff: effect can't be NULL

Force-beedback core guarantees that the 'effect' pointer that's being passed
to ->upload() callback is non-NULL.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

+1 -1
+1 -1
drivers/hid/usbhid/hid-pidff.c
··· 569 569 int error; 570 570 571 571 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 0; 572 - if (old && effect) { 572 + if (old) { 573 573 pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 574 574 pidff->pid_id[effect->id]; 575 575 }