]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
arm/xen: Adjust one function call together with a variable assignment
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 4 Jun 2017 19:21:20 +0000 (21:21 +0200)
committerStefano Stabellini <sstabellini@kernel.org>
Mon, 5 Jun 2017 17:38:24 +0000 (10:38 -0700)
The script "checkpatch.pl" pointed information out like the following.

ERROR: do not use assignment in if condition

Thus fix the affected source code place.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
arch/arm/xen/p2m.c

index f5f74ac637b9f41996572e07fe56326a0447fde0..e71eefa2e427bf2703ba7f6c7fb7a6577d8ab390 100644 (file)
@@ -153,7 +153,8 @@ bool __set_phys_to_machine_multi(unsigned long pfn,
        p2m_entry->mfn = mfn;
 
        write_lock_irqsave(&p2m_lock, irqflags);
-       if ((rc = xen_add_phys_to_mach_entry(p2m_entry)) < 0) {
+       rc = xen_add_phys_to_mach_entry(p2m_entry);
+       if (rc < 0) {
                write_unlock_irqrestore(&p2m_lock, irqflags);
                return false;
        }