Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);