mm: cma: Print correct request pages

In case of cma allocation failure, req-size is logged, but instead of
requested size we are printing total size. Fix it.

Fixes: 45422bc880 ("mm: cma: Print region name on failure")
Change-Id: Ifc96209a0ccdb295fbb9767d3d93b3a567fa16fd
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
This commit is contained in:
Zhenhua Huang 2021-02-03 13:30:49 +08:00
parent 9d5ec5ad1d
commit cddd337a70

View file

@ -561,7 +561,7 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
if (ret && !no_warn) {
pr_err("%s: %s: alloc failed, req-size: %zu pages, ret: %d\n",
__func__, cma->name, cma->count, ret);
__func__, cma->name, count, ret);
cma_debug_show_areas(cma);
}