From: Laurent Pinchart Date: Fri, 24 Oct 2014 10:18:39 +0000 (+0300) Subject: mm: cma: Don't crash on allocation if CMA area can't be activated X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~163^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f022d8cb7ec70fe8edd56383d876001317ee76b1;p=pandora-kernel.git mm: cma: Don't crash on allocation if CMA area can't be activated If activation of the CMA area fails its mutex won't be initialized, leading to an oops at allocation time when trying to lock the mutex. Fix this by setting the cma area count field to 0 when activation fails, leading to allocation returning NULL immediately. Cc: # v3.17 Signed-off-by: Laurent Pinchart Acked-by: Michal Nazarewicz Signed-off-by: Marek Szyprowski --- Reading git-diff-tree failed