Skip to content

Commit b9e9cd3

Browse files
author
Jiri Kosina
committed
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 parent f1088b3 commit b9e9cd3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/hid/usbhid/hid-pidff.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ static int pidff_upload_effect(struct input_dev *dev, struct ff_effect *effect,
569569
int error;
570570

571571
pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] = 0;
572-
if (old && effect) {
572+
if (old) {
573573
pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0] =
574574
pidff->pid_id[effect->id];
575575
}

0 commit comments

Comments
 (0)