···17891789static int atmel_aes_gcm_setauthsize(struct crypto_aead *tfm,17901790 unsigned int authsize)17911791{17921792- /* Same as crypto_gcm_authsize() from crypto/gcm.c */17931793- switch (authsize) {17941794- case 4:17951795- case 8:17961796- case 12:17971797- case 13:17981798- case 14:17991799- case 15:18001800- case 16:18011801- break;18021802- default:18031803- return -EINVAL;18041804- }18051805-18061806- return 0;17921792+ return crypto_gcm_check_authsize(authsize);18071793}1808179418091795static int atmel_aes_gcm_encrypt(struct aead_request *req)