Skip to content

Commit

Permalink
HID: remove self-assignment from hid_input_report
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felix Rueegg authored and Jiri Kosina committed Oct 30, 2013
1 parent d4b1bba commit 556483e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 556483e

Please sign in to comment.