aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/sysctl.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-03-12 15:31:36 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-03-12 15:31:36 +0000
commit793c8368986825befff8d08e537a03a3ee14dc38 (patch)
tree72d3efc15b8b7df28b1361d900618571fef147de /xen/common/sysctl.c
parent0aef8a0311fab6deb58b8d528810711666914f0e (diff)
downloadxen-793c8368986825befff8d08e537a03a3ee14dc38.tar.gz
xen-793c8368986825befff8d08e537a03a3ee14dc38.tar.bz2
xen-793c8368986825befff8d08e537a03a3ee14dc38.zip
Code cleanups after page offline patch.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/sysctl.c')
-rw-r--r--xen/common/sysctl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index 7ff4f5d8a5..898cdc1e58 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -241,7 +241,7 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl)
ptr = status = xmalloc_bytes( sizeof(uint32_t) *
(op->u.page_offline.end -
op->u.page_offline.start + 1));
- if (!status)
+ if ( !status )
{
dprintk(XENLOG_WARNING, "Out of memory for page offline op\n");
ret = -ENOMEM;
@@ -255,7 +255,7 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl)
pfn <= op->u.page_offline.end;
pfn ++ )
{
- switch (op->u.page_offline.cmd)
+ switch ( op->u.page_offline.cmd )
{
/* Shall revert her if failed, or leave caller do it? */
case sysctl_page_offline:
@@ -278,12 +278,14 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl)
break;
}
- if (copy_to_guest(op->u.page_offline.status, status,
- op->u.page_offline.end - op->u.page_offline.start + 1))
+ if ( copy_to_guest(
+ op->u.page_offline.status, status,
+ op->u.page_offline.end - op->u.page_offline.start + 1) )
{
ret = -EFAULT;
break;
}
+
xfree(status);
}
break;