summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2017-04-04 11:34:30 -0400
committerSean Paul <seanpaul@chromium.org>2017-04-04 11:34:31 -0400
commite35d752f01d83357a5d02c7ce257a9ca6ac85a76 (patch)
tree8c207c60f5043c5c492011f2d5da37f93a062959
parent9d35114e78bdac3f2e36fc0ba928322209717f90 (diff)
parent69ef4995da43c512ffa7d4e57d5124489a0b417f (diff)
downloadlinux-crypto-e35d752f01d83357a5d02c7ce257a9ca6ac85a76.tar.gz
linux-crypto-e35d752f01d83357a5d02c7ce257a9ca6ac85a76.zip
Merge tag 'topic/synopsys-media-formats-2017-04-03' of git://anongit.freedesktop.org/git/drm-misc into drm-misc-next
Media formats for synopsys HDMI TX Controller Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20170403163544.kcw5kk52tgku5xua@art_vandelay
-rw-r--r--crypto/lrw.c7
-rw-r--r--crypto/xts.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/crypto/lrw.c b/crypto/lrw.c
index ecd84740..3ea095ad 100644
--- a/crypto/lrw.c
+++ b/crypto/lrw.c
@@ -286,8 +286,11 @@ static int init_crypt(struct skcipher_request *req, crypto_completion_t done)
subreq->cryptlen = LRW_BUFFER_SIZE;
if (req->cryptlen > LRW_BUFFER_SIZE) {
- subreq->cryptlen = min(req->cryptlen, (unsigned)PAGE_SIZE);
- rctx->ext = kmalloc(subreq->cryptlen, gfp);
+ unsigned int n = min(req->cryptlen, (unsigned int)PAGE_SIZE);
+
+ rctx->ext = kmalloc(n, gfp);
+ if (rctx->ext)
+ subreq->cryptlen = n;
}
rctx->src = req->src;
diff --git a/crypto/xts.c b/crypto/xts.c
index baeb34dd..c976bfac 100644
--- a/crypto/xts.c
+++ b/crypto/xts.c
@@ -230,8 +230,11 @@ static int init_crypt(struct skcipher_request *req, crypto_completion_t done)
subreq->cryptlen = XTS_BUFFER_SIZE;
if (req->cryptlen > XTS_BUFFER_SIZE) {
- subreq->cryptlen = min(req->cryptlen, (unsigned)PAGE_SIZE);
- rctx->ext = kmalloc(subreq->cryptlen, gfp);
+ unsigned int n = min(req->cryptlen, (unsigned int)PAGE_SIZE);
+
+ rctx->ext = kmalloc(n, gfp);
+ if (rctx->ext)
+ subreq->cryptlen = n;
}
rctx->src = req->src;