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 a8296e0..dfcf74a 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;