[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1381253627-2223-1-git-send-email-felix.rueegg@gmail.com>
Date: Tue, 8 Oct 2013 19:33:47 +0200
From: Felix Rueegg <felix.rueegg@...il.com>
To: jkosina@...e.cz
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
Felix Rueegg <felix.rueegg@...il.com>
Subject: [PATCH] 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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists