aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/card/block.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index cbd4b6e3e17c..93fe2e5dd616 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -414,13 +414,12 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
414 return ERR_PTR(-ENOSPC); 414 return ERR_PTR(-ENOSPC);
415 __set_bit(devidx, dev_use); 415 __set_bit(devidx, dev_use);
416 416
417 md = kmalloc(sizeof(struct mmc_blk_data), GFP_KERNEL); 417 md = kzalloc(sizeof(struct mmc_blk_data), GFP_KERNEL);
418 if (!md) { 418 if (!md) {
419 ret = -ENOMEM; 419 ret = -ENOMEM;
420 goto out; 420 goto out;
421 } 421 }
422 422
423 memset(md, 0, sizeof(struct mmc_blk_data));
424 423
425 /* 424 /*
426 * Set the read-only status based on the supported commands 425 * Set the read-only status based on the supported commands