projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4b1bba
)
HID: remove self-assignment from hid_input_report
author
Felix Rueegg
<felix.rueegg@gmail.com>
Tue, 8 Oct 2013 17:33:47 +0000
(19:33 +0200)
committer
Jiri Kosina
<jkosina@suse.cz>
Wed, 30 Oct 2013 13:34:28 +0000
(14:34 +0100)
The ternary expression will always result in a self-assignment, which is
pointless.
Signed-off-by: Felix Rueegg <felix.rueegg@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c
patch
|
blob
|
history
diff --git
a/drivers/hid/hid-core.c
b/drivers/hid/hid-core.c
index
b8470b1
..
868ebaa
100644
(file)
--- a/
drivers/hid/hid-core.c
+++ b/
drivers/hid/hid-core.c
@@
-1417,10
+1417,8
@@
int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
ret = hdrv->raw_event(hid, report, data, size);
- if (ret < 0) {
- ret = ret < 0 ? ret : 0;
+ if (ret < 0)
goto unlock;
- }
}
ret = hid_report_raw_event(hid, type, data, size, interrupt);