In addition, 'copyback' should be cleared even in the error case.
Also fix the indentation of the arguments to copy_to_guest() to help clarify
that the 'ret = -EFAULT' is not part of the condition.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
}
if ( copy_to_guest(
- op->u.page_offline.status, status,
- op->u.page_offline.end - op->u.page_offline.start + 1) )
- {
+ op->u.page_offline.status, status,
+ op->u.page_offline.end - op->u.page_offline.start + 1) )
ret = -EFAULT;
- break;
- }
xfree(status);
copyback = 0;