]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/zswap.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next
[karo-tx-linux.git] / mm / zswap.c
index 18d8e87119a6039dcb1db6fdf236e116e71e1072..d39581a076c3aed1e9db7b2408c3f8da9ef60415 100644 (file)
@@ -371,10 +371,9 @@ static int zswap_dstmem_prepare(unsigned int cpu)
        u8 *dst;
 
        dst = kmalloc_node(PAGE_SIZE * 2, GFP_KERNEL, cpu_to_node(cpu));
-       if (!dst) {
-               pr_err("can't allocate compressor buffer\n");
+       if (!dst)
                return -ENOMEM;
-       }
+
        per_cpu(zswap_dstmem, cpu) = dst;
        return 0;
 }
@@ -1156,7 +1155,7 @@ static void zswap_frontswap_init(unsigned type)
 {
        struct zswap_tree *tree;
 
-       tree = kzalloc(sizeof(struct zswap_tree), GFP_KERNEL);
+       tree = kzalloc(sizeof(*tree), GFP_KERNEL);
        if (!tree) {
                pr_err("alloc failed, zswap disabled for swap type %d\n", type);
                return;