.. | .. |
---|
111 | 111 | { |
---|
112 | 112 | struct crc_ctx *mctx = crypto_shash_ctx(tfm); |
---|
113 | 113 | |
---|
114 | | - if (newkeylen != sizeof(mctx->key)) { |
---|
115 | | - crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); |
---|
| 114 | + if (newkeylen != sizeof(mctx->key)) |
---|
116 | 115 | return -EINVAL; |
---|
117 | | - } |
---|
118 | 116 | mctx->key = le32_to_cpu(*(__le32 *)newkey); |
---|
119 | 117 | return 0; |
---|
120 | 118 | } |
---|
.. | .. |
---|
124 | 122 | { |
---|
125 | 123 | struct crc_ctx *mctx = crypto_shash_ctx(tfm); |
---|
126 | 124 | |
---|
127 | | - if (newkeylen != sizeof(mctx->key)) { |
---|
128 | | - crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); |
---|
| 125 | + if (newkeylen != sizeof(mctx->key)) |
---|
129 | 126 | return -EINVAL; |
---|
130 | | - } |
---|
131 | 127 | mctx->key = be32_to_cpu(*(__be32 *)newkey); |
---|
132 | 128 | return 0; |
---|
133 | 129 | } |
---|