summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorWill Thomas <will.thomas@imgtec.com>2016-08-05 14:00:14 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2016-08-09 18:47:19 +0800
commit10badea259fab2ec91a5e6bf1e568a01e4cb5263 (patch)
treec4dd546e7b50ce90be3e32da2121224d0890c80d /drivers/crypto
parent0fae0c1e1d7991ce0dbefdd1c35c14e9d0025cc2 (diff)
downloadlinux-stable-10badea259fab2ec91a5e6bf1e568a01e4cb5263.tar.gz
linux-stable-10badea259fab2ec91a5e6bf1e568a01e4cb5263.tar.bz2
linux-stable-10badea259fab2ec91a5e6bf1e568a01e4cb5263.zip
crypto: img-hash - Fix null pointer exception
Sporadic null pointer exceptions came from here. Fix them. Signed-off-by: Will Thomas <will.thomas@imgtec.com> Reviewed-by: James Hartley <james.hartley@imgtec.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/img-hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c
index 68e8aa90fe01..e5c941bdc693 100644
--- a/drivers/crypto/img-hash.c
+++ b/drivers/crypto/img-hash.c
@@ -361,7 +361,7 @@ static void img_hash_dma_task(unsigned long d)
size_t nbytes, bleft, wsend, len, tbc;
struct scatterlist tsg;
- if (!ctx->sg)
+ if (!hdev->req || !ctx->sg)
return;
addr = sg_virt(ctx->sg);