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

Commit 9bcf0bc1 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "crypto: qcedev: Add null pointer check on sg_src"

parents 13bb0843 946f6f3c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2443,6 +2443,9 @@ static int _qce_sps_add_sg_data(struct qce_device *pce_dev,
	struct sps_iovec *iovec = sps_bam_pipe->iovec +
						sps_bam_pipe->iovec_count;

	if (!sg_src)
		return -ENOENT;

	while (nbytes > 0) {
		len = min(nbytes, sg_dma_len(sg_src));
		nbytes -= len;