]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/ah4.c
[IPV4] fib_rules.c: make struct fib_rules static again
[linux-2.6-omap-h63xx.git] / net / ipv4 / ah4.c
index 514c85b2631a3332187141c2afdd7ed7825314cb..aed537fa2c88507440c68daf87076c6a56332cb6 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/crypto.h>
 #include <linux/pfkeyv2.h>
 #include <net/icmp.h>
+#include <net/protocol.h>
 #include <asm/scatterlist.h>
 
 
@@ -263,10 +264,8 @@ static int ah_init_state(struct xfrm_state *x)
 
 error:
        if (ahp) {
-               if (ahp->work_icv)
-                       kfree(ahp->work_icv);
-               if (ahp->tfm)
-                       crypto_free_tfm(ahp->tfm);
+               kfree(ahp->work_icv);
+               crypto_free_tfm(ahp->tfm);
                kfree(ahp);
        }
        return -EINVAL;
@@ -279,14 +278,10 @@ static void ah_destroy(struct xfrm_state *x)
        if (!ahp)
                return;
 
-       if (ahp->work_icv) {
-               kfree(ahp->work_icv);
-               ahp->work_icv = NULL;
-       }
-       if (ahp->tfm) {
-               crypto_free_tfm(ahp->tfm);
-               ahp->tfm = NULL;
-       }
+       kfree(ahp->work_icv);
+       ahp->work_icv = NULL;
+       crypto_free_tfm(ahp->tfm);
+       ahp->tfm = NULL;
        kfree(ahp);
 }