Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: <[email protected]> # v3.17 Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Michal Nazarewicz <[email protected]> Signed-off-by: Marek Szyprowski <[email protected]>
- Loading branch information