From fdb5950754eb3dedb9fea7c8828d3e51d9dbc3f7 Mon Sep 17 00:00:00 2001 From: Marco Stornelli Date: Thu, 12 Jan 2012 17:20:58 -0800 Subject: ramoops: fix use of rounddown_pow_of_two() The return value of rounddown_pow_of_two wasn't evaluated, so the operation was a no-op. Signed-off-by: Marco Stornelli Reported-by: Andrew Morton Reviewed-by: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds diff --git a/drivers/char/ramoops.c b/drivers/char/ramoops.c index feda90c..9c152ab 100644 --- a/drivers/char/ramoops.c +++ b/drivers/char/ramoops.c @@ -125,8 +125,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 && -- cgit v0.10.2