提交 27d555d1 编写于 作者: R Rasmus Villemoes 提交者: Linus Torvalds

lib: list_sort_test(): return -ENOMEM when allocation fails

Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: Don Mullis <don.mullis@gmail.com>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 087face5
......@@ -207,7 +207,7 @@ static int __init cmp(void *priv, struct list_head *a, struct list_head *b)
static int __init list_sort_test(void)
{
int i, count = 1, err = -EINVAL;
int i, count = 1, err = -ENOMEM;
struct debug_el *el;
struct list_head *cur, *tmp;
LIST_HEAD(head);
......@@ -239,6 +239,7 @@ static int __init list_sort_test(void)
list_sort(NULL, &head, cmp);
err = -EINVAL;
for (cur = head.next; cur->next != &head; cur = cur->next) {
struct debug_el *el1;
int cmp_result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册