From: Bob Liu Date: Tue, 23 Oct 2012 06:45:57 +0000 (+0800) Subject: mm: cma: alloc_contig_range: return early for err path X-Git-Tag: firefly_0821_release~3680^2~1729^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a1f102136538553a9488c713a336065ebb567542;p=firefly-linux-kernel-4.4.55.git mm: cma: alloc_contig_range: return early for err path If start_isolate_page_range() failed, unset_migratetype_isolate() has been done inside it. Signed-off-by: Bob Liu Signed-off-by: Marek Szyprowski --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index bb90971182bd..b0012ab372a4 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5825,7 +5825,7 @@ int alloc_contig_range(unsigned long start, unsigned long end, ret = start_isolate_page_range(pfn_max_align_down(start), pfn_max_align_up(end), migratetype); if (ret) - goto done; + return ret; ret = __alloc_contig_migrate_range(&cc, start, end); if (ret)