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

Commit 7c705a45 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: avoid zero length scatterlist allocation"

parents f64c3b28 ec022ec0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ static inline unsigned int kgsl_get_sg_pa(struct scatterlist *sg)

static inline void *kgsl_sg_alloc(unsigned int sglen)
{
	if (sglen >= ULONG_MAX / sizeof(struct scatterlist))
	if ((sglen == 0) || (sglen >= ULONG_MAX / sizeof(struct scatterlist)))
		return NULL;

	if ((sglen * sizeof(struct scatterlist)) <  PAGE_SIZE)