Merge tag 'dmaengine-fix-4.16-rc5' of git://git.infradead.org/users/vkoul/slave-dma
[linux-2.6-microblaze.git] / lib / test_list_sort.c
index 28e8173..5474f3f 100644 (file)
@@ -76,17 +76,14 @@ static int __init list_sort_test(void)
        pr_debug("start testing list_sort()\n");
 
        elts = kcalloc(TEST_LIST_LEN, sizeof(*elts), GFP_KERNEL);
-       if (!elts) {
-               pr_err("error: cannot allocate memory\n");
+       if (!elts)
                return err;
-       }
 
        for (i = 0; i < TEST_LIST_LEN; i++) {
                el = kmalloc(sizeof(*el), GFP_KERNEL);
-               if (!el) {
-                       pr_err("error: cannot allocate memory\n");
+               if (!el)
                        goto exit;
-               }
+
                 /* force some equivalencies */
                el->value = prandom_u32() % (TEST_LIST_LEN / 3);
                el->serial = i;