]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/ipcomp.c
[ARM] 4759/1: [AT91] Buttons on CSB300
[linux-2.6-omap-h63xx.git] / net / ipv4 / ipcomp.c
index ca1b5fdb8d31387d6400e4188c486b8100059314..2c44a94c2135d80aebb3a8708292b829f6f3bcf6 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/module.h>
 #include <asm/semaphore.h>
 #include <linux/crypto.h>
+#include <linux/err.h>
 #include <linux/pfkeyv2.h>
 #include <linux/percpu.h>
 #include <linux/smp.h>
@@ -344,7 +345,7 @@ static struct crypto_comp **ipcomp_alloc_tfms(const char *alg_name)
        for_each_possible_cpu(cpu) {
                struct crypto_comp *tfm = crypto_alloc_comp(alg_name, 0,
                                                            CRYPTO_ALG_ASYNC);
-               if (!tfm)
+               if (IS_ERR(tfm))
                        goto error;
                *per_cpu_ptr(tfms, cpu) = tfm;
        }