equal
deleted
inserted
replaced
163 { |
163 { |
164 struct update_buffer *const update = f->private_data; |
164 struct update_buffer *const update = f->private_data; |
165 if (*off + len > sizeof(update->data)) |
165 if (*off + len > sizeof(update->data)) |
166 return 0; |
166 return 0; |
167 |
167 |
168 copy_from_user(update->data + *off, buf, len); |
168 if (copy_from_user(update->data + *off, buf, len)) { |
|
169 return -EFAULT; |
|
170 } |
|
171 |
169 *off += len; |
172 *off += len; |
170 update->size = *off; |
173 update->size = *off; |
171 return len; |
174 return len; |
172 } |
175 } |
173 |
176 |