diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2025-03-15 16:20:16 +0800 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-03-21 17:33:39 +0800 |
| commit | 9cf792844d5da59403c1b36e68d65291676d935b (patch) | |
| tree | b12104a00ae24a42fc39cc468805b2fd2484ea1a | |
| parent | crypto: lib/Kconfig - hide library options (diff) | |
| download | linux-9cf792844d5da59403c1b36e68d65291676d935b.tar.gz linux-9cf792844d5da59403c1b36e68d65291676d935b.zip | |
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 <herbert@gondor.apana.org.au>
| -rw-r--r-- | drivers/crypto/padlock-sha.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c index 6865c7f1fc1a..db9e84c0c9fb 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); } |
