From 80840912da1d6cdab5e2e8cce1fb743f84c1613e Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 5 Nov 2012 09:42:17 +0300 Subject: [PATCH] xen/privcmd: fix condition in privcmd_close() The parenthesis are in the wrong place so the original code is equivalent to: if (!xen_feature(XENFEAT_writable_descriptor_tables)) { ... Which obviously was not intended. Signed-off-by: Dan Carpenter Signed-off-by: Konrad Rzeszutek Wilk --- drivers/xen/privcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c index b9d08987a5a5..6011f3bde537 100644 --- a/drivers/xen/privcmd.c +++ b/drivers/xen/privcmd.c @@ -495,7 +495,7 @@ static void privcmd_close(struct vm_area_struct *vma) struct page **pages = vma->vm_private_data; int numpgs = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; - if (!xen_feature(XENFEAT_auto_translated_physmap || !numpgs || !pages)) + if (!xen_feature(XENFEAT_auto_translated_physmap) || !numpgs || !pages) return; xen_unmap_domain_mfn_range(vma, numpgs, pages); -- 2.39.5