mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
drm/amdgpu: fix overflowed array index read warning
[ Upstream commit ebbc2ada5c636a6a63d8316a3408753768f5aa9f ] Clear overflowed array index read warning by cast operation. Signed-off-by: Tim Huang <Tim.Huang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d219f902b1
commit
cbf1a8ee11
@@ -434,8 +434,9 @@ static ssize_t amdgpu_debugfs_ring_read(struct file *f, char __user *buf,
|
|||||||
size_t size, loff_t *pos)
|
size_t size, loff_t *pos)
|
||||||
{
|
{
|
||||||
struct amdgpu_ring *ring = file_inode(f)->i_private;
|
struct amdgpu_ring *ring = file_inode(f)->i_private;
|
||||||
int r, i;
|
|
||||||
uint32_t value, result, early[3];
|
uint32_t value, result, early[3];
|
||||||
|
loff_t i;
|
||||||
|
int r;
|
||||||
|
|
||||||
if (*pos & 3 || size & 3)
|
if (*pos & 3 || size & 3)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|||||||
Reference in New Issue
Block a user