]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mmc/kona_sdhci.c
JFFS2: Speed up and fix comparison functions
[karo-tx-uboot.git] / drivers / mmc / kona_sdhci.c
index 77e42c8afe87c1d4cce3abe9fe377df497491c3d..3653d00b1bd70b02877668d73e2084d825cad7be 100644 (file)
@@ -113,16 +113,19 @@ int kona_sdhci_init(int dev_index, u32 min_clk, u32 quirks)
                       __func__, dev_index);
                ret = -EINVAL;
        }
-       if (ret)
+       if (ret) {
+               free(host);
                return ret;
+       }
 
        host->name = "kona-sdhci";
        host->ioaddr = reg_base;
        host->quirks = quirks;
-       host->host_caps = MMC_MODE_HC;
 
-       if (init_kona_mmc_core(host))
+       if (init_kona_mmc_core(host)) {
+               free(host);
                return -EINVAL;
+       }
 
        if (quirks & SDHCI_QUIRK_REG32_RW)
                host->version = sdhci_readl(host, SDHCI_HOST_VERSION - 2) >> 16;