From: Alex Deucher Date: Mon, 1 Jul 2013 17:32:49 +0000 (-0400) Subject: drm/radeon/atom: fix endian bug in radeon_atom_init_mc_reg_table() X-Git-Tag: firefly_0821_release~176^2~5752^2~22^2~10 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5c7524bf068ebe077254a6c37fcfa27e6cb6a1f3;p=firefly-linux-kernel-4.4.55.git drm/radeon/atom: fix endian bug in radeon_atom_init_mc_reg_table() Signed-off-by: Alex Deucher --- 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;