diff options
author | Jiri Kosina <jkosina@suse.cz> | 2015-03-27 16:03:26 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-03-27 16:03:26 +0100 |
commit | b9e9cd32ba33d13c7ecbc15b9f4418beded403d2 (patch) | |
tree | 84667f0d19e7b0768f98dabfe2c97d0320ff43b2 /drivers/hid/usbhid | |
parent | f1088b38ff486653f8645e2dff74e2a1397f9e31 (diff) | |
download | op-kernel-dev-b9e9cd32ba33d13c7ecbc15b9f4418beded403d2.zip op-kernel-dev-b9e9cd32ba33d13c7ecbc15b9f4418beded403d2.tar.gz |
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>
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r-- | drivers/hid/usbhid/hid-pidff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c index 1b3fa70..08174d3 100644 --- a/drivers/hid/usbhid/hid-pidff.c +++ b/drivers/hid/usbhid/hid-pidff.c @@ -569,7 +569,7 @@ static int pidff_upload_effect(struct input_dev *dev, struct ff_effect *effect, int error; pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 0; - if (old && effect) { + if (old) { pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = pidff->pid_id[effect->id]; } |