projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1088b3
)
HID: pidff: effect can't be NULL
author
Jiri Kosina
<jkosina@suse.cz>
Fri, 27 Mar 2015 15:03:26 +0000
(16:03 +0100)
committer
Jiri Kosina
<jkosina@suse.cz>
Fri, 27 Mar 2015 15:03:26 +0000
(16:03 +0100)
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>
drivers/hid/usbhid/hid-pidff.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hid/usbhid/hid-pidff.c
b/drivers/hid/usbhid/hid-pidff.c
index 1b3fa70bd5ffb09a45a343b23af74eb6be10ff67..08174d341f4a10cbb54b1a2cc2e894a3ee17c028 100644
(file)
--- 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];
}