mac80211: Don't squash error codes in key setup functions
[pandora-kernel.git] / net / mac80211 / aes_cmac.c
index 3d097b3..b4d66cc 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;
 }