summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/list_sort.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/list_sort.c b/lib/list_sort.c
index 291412ade89a..fbdbc867b252 100644
--- a/lib/list_sort.c
+++ b/lib/list_sort.c
@@ -272,6 +272,11 @@ static int __init list_sort_test(void)
}
count++;
}
+ if (head.prev != cur) {
+ printk(KERN_ERR "list_sort_test: error: list is corrupted\n");
+ goto exit;
+ }
+
if (count != TEST_LIST_LEN) {
printk(KERN_ERR "list_sort_test: error: bad list length %d",
OpenPOWER on IntegriCloud