s390: crypto: Use min_t() instead of doing it manually

Fix following coccicheck warning:
drivers/s390/crypto/zcrypt_ep11misc.c:1112:25-26: WARNING opportunity for min()

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
Haowen Bai 2022-03-15 16:01:04 +08:00 committed by Vasily Gorbik
parent f4272c03a3
commit 0f210fb39e

View File

@ -1109,7 +1109,7 @@ static int ep11_wrapkey(u16 card, u16 domain,
if (kb->head.type == TOKTYPE_NON_CCA &&
kb->head.version == TOKVER_EP11_AES) {
has_header = true;
keysize = kb->head.len < keysize ? kb->head.len : keysize;
keysize = min_t(size_t, kb->head.len, keysize);
}
/* request cprb and payload */