Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7325fbe3 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ion: return proper error value on allocation failure"

parents f38f8b05 ec554f88
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 * drivers/staging/android/ion/ion_system_heap.c
 *
 * Copyright (C) 2011 Google, Inc.
 * Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2019, The Linux Foundation. All rights reserved.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
@@ -331,8 +331,10 @@ static int ion_system_heap_allocate(struct ion_heap *heap,
		goto err;

	table = kzalloc(sizeof(*table), GFP_KERNEL);
	if (!table)
	if (!table) {
		ret = -ENOMEM;
		goto err_free_data_pages;
	}

	ret = sg_alloc_table(table, i, GFP_KERNEL);
	if (ret)