Skip to content
Snippets Groups Projects
Commit cdfd1ac6 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Andy Fleming
Browse files

mmc: fix capacity calculation when EXT_CSD_SEC_CNT is used


Since the type of "ext_csd" was array of char, the following
calculation might fail when the value of ext_csd[EXT_CSD_SEC_CNT]
was minus.

	capacity = ext_csd[EXT_CSD_SEC_CNT] << 0
			| ext_csd[EXT_CSD_SEC_CNT + 1] << 8
			| ext_csd[EXT_CSD_SEC_CNT + 2] << 16
			| ext_csd[EXT_CSD_SEC_CNT + 3] << 24;

So, this patch changes the type of "ext_csd" to array of u8.

Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
parent 97a7b992
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment