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

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

Merge "msm : mdss: fix unaligned access problem"

parents 46ed2394 2ee6aab7
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -416,6 +416,9 @@ static ssize_t mdss_debug_base_offset_write(struct file *file,

	buf[count] = 0;	/* end of string */

	if (off % sizeof(u32))
		return -EINVAL;

	sscanf(buf, "%5x %x", &off, &cnt);

	if (off > dbg->max_offset)
@@ -490,6 +493,9 @@ static ssize_t mdss_debug_base_reg_write(struct file *file,
	if (cnt < 2)
		return -EFAULT;

	if (off % sizeof(u32))
		return -EFAULT;

	if (off >= dbg->max_offset)
		return -EFAULT;

@@ -535,6 +541,9 @@ static ssize_t mdss_debug_base_reg_read(struct file *file,
			return -ENOMEM;
		}

		if (dbg->off % sizeof(u32))
			return -EFAULT;

		ptr = dbg->base + dbg->off;
		tot = 0;