Merge "msm: sde: fix unaligned access problem"
This commit is contained in:
commit
99033c40bb
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue