From: Felix Rueegg Date: Tue, 8 Oct 2013 17:33:47 +0000 (+0200) Subject: HID: remove self-assignment from hid_input_report X-Git-Tag: v3.13-rc1~63^2^6~5 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=556483e2ad4961bd2770e3b65f3a0eb2825d5791;p=linux.git 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 Signed-off-by: Jiri Kosina --- 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);