Commit cf28a673 authored by Alan Ott's avatar Alan Ott Committed by Jiri Kosina

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: default avatarAlan Ott <>
Signed-off-by: default avatarJiri Kosina <>
parent 581548db
......@@ -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;
list->tail = (list->tail + 1) & (HIDRAW_BUFFER_SIZE - 1);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment