]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/mac80211/aes_cmac.c
mac80211: Don't squash error codes in key setup functions
[mv-sheeva.git] / net / mac80211 / aes_cmac.c
index 3d097b3d7b62ad86c94a86eec92a3b9b3554c526..b4d66cca76d6d719324cee76d2706881df69e4a0 100644 (file)
@@ -119,10 +119,8 @@ struct crypto_cipher * ieee80211_aes_cmac_key_setup(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, AES_CMAC_KEY_LEN);
+       if (!IS_ERR(tfm))
+               crypto_cipher_setkey(tfm, key, AES_CMAC_KEY_LEN);
 
        return tfm;
 }