Skip to content
Snippets Groups Projects
Commit fbd19e4f authored by Asutosh Das's avatar Asutosh Das
Browse files

mmc: core: fix variable being overwritten


The status variable is being overwritten by label variable,
since the latter is an array of 0 length. Hence, move label
to be the last member of the structure.

CRs-fixed: 642326
Change-Id: If63d760427b729fe60731aad89144a600f2a2cb7
Signed-off-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
parent 53f84163
No related branches found
No related tags found
No related merge requests found
...@@ -21,8 +21,8 @@ struct mmc_gpio { ...@@ -21,8 +21,8 @@ struct mmc_gpio {
int ro_gpio; int ro_gpio;
int cd_gpio; int cd_gpio;
char *ro_label; char *ro_label;
char cd_label[0];
bool status; bool status;
char cd_label[0]; /* Must be last entry */
}; };
static int mmc_gpio_get_status(struct mmc_host *host) static int mmc_gpio_get_status(struct mmc_host *host)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment