"Hardware doesn't specify base clock frequency" may not be only the
error case of sdhci_setup_cfg().  It is better to print this where
the corresponding error is triggered.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
                                SDHCI_CLOCK_BASE_SHIFT;
                cfg->f_max *= 1000000;
        }
-       if (cfg->f_max == 0)
+       if (cfg->f_max == 0) {
+               printf("%s: Hardware doesn't specify base clock frequency\n",
+                      __func__);
                return -EINVAL;
+       }
        if (min_clk)
                cfg->f_min = min_clk;
        else {
 #else
 int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk)
 {
+       int ret;
+
 #ifdef CONFIG_MMC_SDMA
        unsigned int caps;
 
        }
 #endif
 
-       if (sdhci_setup_cfg(&host->cfg, host, max_clk, min_clk)) {
-               printf("%s: Hardware doesn't specify base clock frequency\n",
-                      __func__);
-               return -EINVAL;
-       }
+       ret = sdhci_setup_cfg(&host->cfg, host, max_clk, min_clk);
+       if (ret)
+               return ret;
 
        if (host->quirks & SDHCI_QUIRK_BROKEN_VOLTAGE)
                host->cfg.voltages |= host->voltages;