* [PATCH] HID: remove self-assignment from hid_input_report
@ 2013-10-08 17:33 Felix Rueegg
2013-10-30 13:41 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Felix Rueegg @ 2013-10-08 17:33 UTC (permalink / raw)
To: jkosina; +Cc: linux-input, linux-kernel, Felix Rueegg
The ternary expression will always result in a self-assignment, which is pointless.
Signed-off-by: Felix Rueegg <felix.rueegg@gmail.com>
---
drivers/hid/hid-core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 5a8c011..ae0c963 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);
--
1.8.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-30 13:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-08 17:33 [PATCH] HID: remove self-assignment from hid_input_report Felix Rueegg
2013-10-30 13:41 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).