diff options
author | Alan Ott <alan@signal11.us> | 2011-01-26 22:25:18 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-01-31 09:43:46 -0500 |
commit | cf28a673666fba5770b40fb084584391f451c07d (patch) | |
tree | e067eb54ad7ea3e59adce87b483b0749bde09fa1 /drivers | |
parent | 581548db3b3c0f6e25b500329eb02e3c72e7acbe (diff) |
HID: hidraw: Replace Confusing += Operator with =
Setting of the return value of hidraw_read() uses the += operator when
= is more appropriate. There is no case where ret can be anything
other than zero when the assignment is made, making = equivalent to
+= and much more clear.
Signed-off-by: Alan Ott <alan@signal11.us>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/hidraw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index 468e87b53ed2..66fbcbae5343 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -91,7 +91,7 @@ static ssize_t hidraw_read(struct file *file, char __user *buffer, size_t count, | |||
91 | ret = -EFAULT; | 91 | ret = -EFAULT; |
92 | goto out; | 92 | goto out; |
93 | } | 93 | } |
94 | ret += len; | 94 | ret = len; |
95 | 95 | ||
96 | kfree(list->buffer[list->tail].value); | 96 | kfree(list->buffer[list->tail].value); |
97 | list->tail = (list->tail + 1) & (HIDRAW_BUFFER_SIZE - 1); | 97 | list->tail = (list->tail + 1) & (HIDRAW_BUFFER_SIZE - 1); |