summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/padlock-aes.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@hera.kernel.org>2006-03-23 15:39:08 +0100
committerAnton Altaparmakov <aia21@hera.kernel.org>2006-03-23 15:39:08 +0100
commit74293759002aa7db0179158c20676a034614577b (patch)
tree030ef62361042d1a034087ad9a726db3b57bba72 /drivers/crypto/padlock-aes.c
parentNTFS: Fix two compiler warnings on Alpha. Thanks to Andrew Morton for (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc (diff)
downloadlinux-74293759002aa7db0179158c20676a034614577b.tar.xz
linux-74293759002aa7db0179158c20676a034614577b.zip
Merge branch 'master' of /home/aia21/ntfs-2.6/
Diffstat (limited to 'drivers/crypto/padlock-aes.c')
-rw-r--r--drivers/crypto/padlock-aes.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
index 0c08c58252be..5158a9db4bc5 100644
--- a/drivers/crypto/padlock-aes.c
+++ b/drivers/crypto/padlock-aes.c
@@ -284,7 +284,11 @@ aes_hw_extkey_available(uint8_t key_len)
static inline struct aes_ctx *aes_ctx(void *ctx)
{
- return (struct aes_ctx *)ALIGN((unsigned long)ctx, PADLOCK_ALIGNMENT);
+ unsigned long align = PADLOCK_ALIGNMENT;
+
+ if (align <= crypto_tfm_ctx_alignment())
+ align = 1;
+ return (struct aes_ctx *)ALIGN((unsigned long)ctx, align);
}
static int