drm/radeon/atom: fix endian bug in radeon_atom_init_mc_reg_table()
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 1 Jul 2013 17:32:49 +0000 (13:32 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 1 Jul 2013 19:46:40 +0000 (15:46 -0400)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_atombios.c

index a8296e0f8543b3957ae1ac346afabaf3f50f37d3..dfcf74a890146f2a1cfe7bb263007bb1db3788e5 100644 (file)
@@ -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;