1
0
Fork 0

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>
hifive-unleashed-5.1
Alan Ott 2011-01-26 22:25:18 -05:00 committed by Jiri Kosina
parent 581548db3b
commit cf28a67366
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ static ssize_t hidraw_read(struct file *file, char __user *buffer, size_t count,
ret = -EFAULT;
goto out;
}
ret += len;
ret = len;
kfree(list->buffer[list->tail].value);
list->tail = (list->tail + 1) & (HIDRAW_BUFFER_SIZE - 1);