diff options
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/xenfs/privcmd.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/xen/xenfs/privcmd.c b/drivers/xen/xenfs/privcmd.c index f80be7f6eb95..2eb04c842511 100644 --- a/drivers/xen/xenfs/privcmd.c +++ b/drivers/xen/xenfs/privcmd.c | |||
@@ -266,9 +266,7 @@ static int mmap_return_errors(void *data, void *state) | |||
266 | xen_pfn_t *mfnp = data; | 266 | xen_pfn_t *mfnp = data; |
267 | struct mmap_batch_state *st = state; | 267 | struct mmap_batch_state *st = state; |
268 | 268 | ||
269 | put_user(*mfnp, st->user++); | 269 | return put_user(*mfnp, st->user++); |
270 | |||
271 | return 0; | ||
272 | } | 270 | } |
273 | 271 | ||
274 | static struct vm_operations_struct privcmd_vm_ops; | 272 | static struct vm_operations_struct privcmd_vm_ops; |
@@ -323,10 +321,8 @@ static long privcmd_ioctl_mmap_batch(void __user *udata) | |||
323 | up_write(&mm->mmap_sem); | 321 | up_write(&mm->mmap_sem); |
324 | 322 | ||
325 | if (state.err > 0) { | 323 | if (state.err > 0) { |
326 | ret = 0; | ||
327 | |||
328 | state.user = m.arr; | 324 | state.user = m.arr; |
329 | traverse_pages(m.num, sizeof(xen_pfn_t), | 325 | ret = traverse_pages(m.num, sizeof(xen_pfn_t), |
330 | &pagelist, | 326 | &pagelist, |
331 | mmap_return_errors, &state); | 327 | mmap_return_errors, &state); |
332 | } | 328 | } |