]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mmc/core/sdio_bus.c
sdio: store vendor strings
[linux-2.6-omap-h63xx.git] / drivers / mmc / core / sdio_bus.c
index fcb13fb0daad3ff97700ac09cb80d9ef6fcb1e95..0713a8c71e54b2980d88127644e14cd9ed87f748 100644 (file)
@@ -211,6 +211,9 @@ static void sdio_release_func(struct device *dev)
 
        sdio_free_func_cis(func);
 
+       if (func->info)
+               kfree(func->info);
+
        kfree(func);
 }
 
@@ -221,12 +224,10 @@ struct sdio_func *sdio_alloc_func(struct mmc_card *card)
 {
        struct sdio_func *func;
 
-       func = kmalloc(sizeof(struct sdio_func), GFP_KERNEL);
+       func = kzalloc(sizeof(struct sdio_func), GFP_KERNEL);
        if (!func)
                return ERR_PTR(-ENOMEM);
 
-       memset(func, 0, sizeof(struct sdio_func));
-
        func->card = card;
 
        device_initialize(&func->dev);