diff options
| author | Geert Uytterhoeven <geert@linux-m68k.org> | 2015-11-06 06:22:08 -0500 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-11-09 07:16:44 -0500 |
| commit | 62d494ca2773563e333e670cd18378705dad32d4 (patch) | |
| tree | 0922a63981635d04b8db55b09e1c8570ba39541c | |
| parent | ae3fbdd1becdfe4488e43bc023ea672bf2c90660 (diff) | |
mmc: mediatek: Preinitialize delay_phase in get_best_delay()
drivers/mmc/host/mtk-sd.c: In function ‘get_best_delay’:
drivers/mmc/host/mtk-sd.c:1284: warning: ‘delay_phase.start’ is used uninitialized in this function
drivers/mmc/host/mtk-sd.c:1284: warning: ‘delay_phase.maxlen’ is used uninitialized in this function
If delay is zero, these fields are indeed not initialized.
Let the compiler preinitialize the whole struct to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
| -rw-r--r-- | drivers/mmc/host/mtk-sd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 39568cc29a2a..33dfd7e72516 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c | |||
| @@ -1276,7 +1276,7 @@ static struct msdc_delay_phase get_best_delay(struct msdc_host *host, u32 delay) | |||
| 1276 | int start = 0, len = 0; | 1276 | int start = 0, len = 0; |
| 1277 | int start_final = 0, len_final = 0; | 1277 | int start_final = 0, len_final = 0; |
| 1278 | u8 final_phase = 0xff; | 1278 | u8 final_phase = 0xff; |
| 1279 | struct msdc_delay_phase delay_phase; | 1279 | struct msdc_delay_phase delay_phase = { 0, }; |
| 1280 | 1280 | ||
| 1281 | if (delay == 0) { | 1281 | if (delay == 0) { |
| 1282 | dev_err(host->dev, "phase error: [map:%x]\n", delay); | 1282 | dev_err(host->dev, "phase error: [map:%x]\n", delay); |
