mac80211: Don't squash error codes in key setup functions
[deliverable/linux.git] / net / mac80211 / aes_ccm.c
index a87cb3ba2df6eeb146a94a4aba539e99b20b5889..d2b03e0851ef6502f6eeb3064ea93db8e31e7977 100644 (file)
@@ -138,10 +138,8 @@ struct crypto_cipher *ieee80211_aes_key_setup_encrypt(const u8 key[])
        struct crypto_cipher *tfm;
 
        tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC);
-       if (IS_ERR(tfm))
-               return NULL;
-
-       crypto_cipher_setkey(tfm, key, ALG_CCMP_KEY_LEN);
+       if (!IS_ERR(tfm))
+               crypto_cipher_setkey(tfm, key, ALG_CCMP_KEY_LEN);
 
        return tfm;
 }
This page took 0.036295 seconds and 5 git commands to generate.