hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/crypto/camellia_generic.c
....@@ -1,24 +1,12 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2006
34 * NTT (Nippon Telegraph and Telephone Corporation).
4
- *
5
- * This program is free software; you can redistribute it and/or
6
- * modify it under the terms of the GNU General Public License
7
- * as published by the Free Software Foundation; either version 2
8
- * of the License, or (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
175 */
186
197 /*
208 * Algorithm Specification
21
- * http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html
9
+ * https://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html
2210 */
2311
2412 /*
....@@ -982,12 +970,9 @@
982970 {
983971 struct camellia_ctx *cctx = crypto_tfm_ctx(tfm);
984972 const unsigned char *key = (const unsigned char *)in_key;
985
- u32 *flags = &tfm->crt_flags;
986973
987
- if (key_len != 16 && key_len != 24 && key_len != 32) {
988
- *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
974
+ if (key_len != 16 && key_len != 24 && key_len != 32)
989975 return -EINVAL;
990
- }
991976
992977 cctx->key_length = key_len;
993978
....@@ -1092,7 +1077,7 @@
10921077 crypto_unregister_alg(&camellia_alg);
10931078 }
10941079
1095
-module_init(camellia_init);
1080
+subsys_initcall(camellia_init);
10961081 module_exit(camellia_fini);
10971082
10981083 MODULE_DESCRIPTION("Camellia Cipher Algorithm");