aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/core/sdio_bus.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index fcb13fb0daad..683d91740109 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -221,12 +221,10 @@ struct sdio_func *sdio_alloc_func(struct mmc_card *card)
221{ 221{
222 struct sdio_func *func; 222 struct sdio_func *func;
223 223
224 func = kmalloc(sizeof(struct sdio_func), GFP_KERNEL); 224 func = kzalloc(sizeof(struct sdio_func), GFP_KERNEL);
225 if (!func) 225 if (!func)
226 return ERR_PTR(-ENOMEM); 226 return ERR_PTR(-ENOMEM);
227 227
228 memset(func, 0, sizeof(struct sdio_func));
229
230 func->card = card; 228 func->card = card;
231 229
232 device_initialize(&func->dev); 230 device_initialize(&func->dev);