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>
This commit is contained in:
parent
0fae0c1e1d
commit
10badea259
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue