Merge "msm: sde: fix unaligned access problem"

This commit is contained in:
Linux Build Service Account 2017-07-03 07:57:58 -07:00 committed by Gerrit - the friendly Code Review server
commit 99033c40bb

View file

@ -1023,6 +1023,9 @@ static ssize_t sde_rotator_debug_base_offset_write(struct file *file,
if (sscanf(buf, "%5x %x", &off, &cnt) < 2)
return -EINVAL;
if (off % sizeof(u32))
return -EINVAL;
if (off > dbg->max_offset)
return -EINVAL;
@ -1091,6 +1094,9 @@ static ssize_t sde_rotator_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;
@ -1139,6 +1145,9 @@ static ssize_t sde_rotator_debug_base_reg_read(struct file *file,
goto debug_read_error;
}
if (dbg->off % sizeof(u32))
return -EFAULT;
ptr = dbg->base + dbg->off;
tot = 0;