summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorFelix Rueegg <felix.rueegg@gmail.com>2013-10-08 19:33:47 +0200
committerJiri Kosina <jkosina@suse.cz>2013-10-30 14:34:28 +0100
commit556483e2ad4961bd2770e3b65f3a0eb2825d5791 (patch)
treee5b1531fecafd62e109739aba4671395b2765f08 /drivers/hid
parentd4b1bba76171cb783e32441b28462fe841073ed8 (diff)
HID: remove self-assignment from hid_input_report
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index b8470b1a10fe..868ebaa39413 100644
--- 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);