]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ramoops: fix use of rounddown_pow_of_two()
authorMarco Stornelli <marco.stornelli@gmail.com>
Fri, 13 Jan 2012 01:20:58 +0000 (17:20 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 3 Jan 2013 03:33:59 +0000 (03:33 +0000)
commit fdb5950754eb3dedb9fea7c8828d3e51d9dbc3f7 upstream.

The return value of rounddown_pow_of_two wasn't evaluated, so the
operation was a no-op.

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/char/ramoops.c

index 7c7f42a1f880cc81af6dafd89b73810c7eca34aa..96581161b5bf63267374c913f78e146ffa852959 100644 (file)
@@ -126,8 +126,8 @@ static int __init ramoops_probe(struct platform_device *pdev)
                goto fail3;
        }
 
-       rounddown_pow_of_two(pdata->mem_size);
-       rounddown_pow_of_two(pdata->record_size);
+       pdata->mem_size = rounddown_pow_of_two(pdata->mem_size);
+       pdata->record_size = rounddown_pow_of_two(pdata->record_size);
 
        /* Check for the minimum memory size */
        if (pdata->mem_size < MIN_MEM_SIZE &&