1
0
Fork 0

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>
hifive-unleashed-5.1
Will Thomas 2016-08-05 14:00:14 +01:00 committed by Herbert Xu
parent 0fae0c1e1d
commit 10badea259
1 changed files with 1 additions and 1 deletions

View File

@ -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);