]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
xen/privcmd: fix condition in privcmd_close()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 5 Nov 2012 06:42:17 +0000 (09:42 +0300)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 27 Nov 2012 01:11:17 +0000 (20:11 -0500)
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 <dan.carpenter@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/privcmd.c

index b9d08987a5a5183648cca5c83d6788cf7e0eaaf5..6011f3bde537d8ea28aaabdce34cda953537f2ba 100644 (file)
@@ -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);