Commit 10badea2 authored by Will Thomas's avatar Will Thomas Committed by Herbert Xu

crypto: img-hash - Fix null pointer exception

Sporadic null pointer exceptions came from here. Fix them.
Signed-off-by: default avatarWill Thomas <will.thomas@imgtec.com>
Reviewed-by: default avatarJames Hartley <james.hartley@imgtec.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 0fae0c1e
...@@ -361,7 +361,7 @@ static void img_hash_dma_task(unsigned long d) ...@@ -361,7 +361,7 @@ static void img_hash_dma_task(unsigned long d)
size_t nbytes, bleft, wsend, len, tbc; size_t nbytes, bleft, wsend, len, tbc;
struct scatterlist tsg; struct scatterlist tsg;
if (!ctx->sg) if (!hdev->req || !ctx->sg)
return; return;
addr = sg_virt(ctx->sg); addr = sg_virt(ctx->sg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment