]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kernel/memremap: fix up dev_WARN invocation
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 10 Feb 2016 05:42:47 +0000 (16:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 10 Feb 2016 05:43:45 +0000 (16:43 +1100)
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
kernel/memremap.c

index 76fa01cee76b5af5243cba67c3c8274f335ef93a..ba845c3688768123ff548ce0afc4a35fac85b487 100644 (file)
@@ -226,10 +226,9 @@ static void devm_memremap_pages_release(struct device *dev, void *data)
        resource_size_t align_start, align_size;
        struct dev_pagemap *pgmap = &page_map->pgmap;
 
-       if (percpu_ref_tryget_live(pgmap->ref)) {
-               dev_WARN(dev, "%s: page mapping is still live!\n", __func__);
+       if (dev_WARN(dev, percpu_ref_tryget_live(pgmap->ref),
+                    "%s: page mapping is still live!\n", __func__))
                percpu_ref_put(pgmap->ref);
-       }
 
        /* pages are dead and unused, undo the arch mapping */
        align_start = res->start & ~(SECTION_SIZE - 1);