Commit 27d555d1 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Linus Torvalds
Browse files

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

Signed-off-by: default avatarRasmus Villemoes <>
Cc: Artem Bityutskiy <>
Cc: Don Mullis <>
Cc: Dave Chinner <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 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;
......@@ -239,6 +239,7 @@ static int __init list_sort_test(void)
list_sort(NULL, &head, cmp);
err = -EINVAL;
for (cur =; cur->next != &head; cur = cur->next) {
struct debug_el *el1;
int cmp_result;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment