From 5c7524bf068ebe077254a6c37fcfa27e6cb6a1f3 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Mon, 1 Jul 2013 13:32:49 -0400 Subject: [PATCH] drm/radeon/atom: fix endian bug in radeon_atom_init_mc_reg_table() Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon_atombios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index a8296e0f8543..dfcf74a89014 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -3732,7 +3732,7 @@ int radeon_atom_init_mc_reg_table(struct radeon_device *rdev, } num_ranges++; } - reg_data += reg_block->usRegDataBlkSize; + reg_data += le16_to_cpu(reg_block->usRegDataBlkSize); } if (*(u32 *)reg_data != END_OF_REG_DATA_BLOCK) return -EINVAL; -- 2.30.2