diff options
author | Marco Stornelli <marco.stornelli@gmail.com> | 2012-01-12 17:20:58 -0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-01-03 03:33:59 +0000 |
commit | 1df57e407bb02d85ec99558a7fecf091c1399a39 (patch) | |
tree | d0214b6d093fc96b8677584412b50c0358d8a295 | |
parent | 48c70dec9aa7a0a33c3d5329d271e1c884731b6c (diff) |
ramoops: fix use of rounddown_pow_of_two()
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>
-rw-r--r-- | drivers/char/ramoops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/ramoops.c b/drivers/char/ramoops.c index 7c7f42a1f880..96581161b5bf 100644 --- a/drivers/char/ramoops.c +++ b/drivers/char/ramoops.c @@ -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 && |