@@ -944,7 +944,7 @@ u32 mmc_select_voltage(struct mmc_host *host, u32 ocr)
int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage)
{
- struct mmc_command cmd;
+ struct mmc_command cmd = {0};
int err = 0;
BUG_ON(!host);
@@ -954,8 +954,6 @@ int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage)
* 1.8V signalling.
*/
if (signal_voltage == MMC_SIGNAL_VOLTAGE_180) {
- memset(&cmd, 0, sizeof(struct mmc_command));
-
cmd.opcode = SD_SWITCH_VOLTAGE;
cmd.arg = 0;
cmd.flags = MMC_RSP_R1 | MMC_CMD_AC;
@@ -1400,9 +1400,8 @@ static int sdhci_start_signal_voltage_switch(struct mmc_host *mmc,
present_state = sdhci_readl(host,
SDHCI_PRESENT_STATE);
if ((present_state & SDHCI_DATA_LVL_MASK) ==
- SDHCI_DATA_LVL_MASK) {
+ SDHCI_DATA_LVL_MASK)
return 0;
- }
}
}