From: Herbert Xu Date: Sat, 15 Mar 2025 08:20:16 +0000 (+0800) Subject: crypto: padlock - Use zero page instead of stack buffer X-Git-Tag: v6.15-rc1~118^2~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9cf792844d5da59403c1b36e68d65291676d935b;p=thirdparty%2Fkernel%2Flinux.git crypto: padlock - Use zero page instead of stack buffer Use desc instead of a stack buffer in the final function. This fixes a compiler warning about buf being uninitialised. Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c index 6865c7f1fc1a2..db9e84c0c9fb2 100644 --- a/drivers/crypto/padlock-sha.c +++ b/drivers/crypto/padlock-sha.c @@ -125,7 +125,7 @@ out: static int padlock_sha1_final(struct shash_desc *desc, u8 *out) { - u8 buf[4]; + const u8 *buf = (void *)desc; return padlock_sha1_finup(desc, buf, 0, out); } @@ -186,7 +186,7 @@ out: static int padlock_sha256_final(struct shash_desc *desc, u8 *out) { - u8 buf[4]; + const u8 *buf = (void *)desc; return padlock_sha256_finup(desc, buf, 0, out); }