summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-10-17 12:00:56 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2014-11-10 12:40:45 +0100
commit22b787007faed44456414f7ed88331e39f0df387 (patch)
treef8c48f12f72e13d068632206712d6e0f242f9a44 /drivers/mmc/core
parent601ed60cef722d1fcdbf46e5b63a7892585abf7b (diff)
downloadlinux-22b787007faed44456414f7ed88331e39f0df387.tar.gz
linux-22b787007faed44456414f7ed88331e39f0df387.tar.bz2
linux-22b787007faed44456414f7ed88331e39f0df387.zip
mmc: core: Convert to use kzalloc() for CXD register buffers
While allocating buffers for CXD data, let's use kzalloc() to make sure those are zeroed. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r--drivers/mmc/core/mmc_ops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index e04008f6fc24..23aa3a380f27 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -315,7 +315,7 @@ int mmc_send_csd(struct mmc_card *card, u32 *csd)
return mmc_send_cxd_native(card->host, card->rca << 16,
csd, MMC_SEND_CSD);
- csd_tmp = kmalloc(16, GFP_KERNEL);
+ csd_tmp = kzalloc(16, GFP_KERNEL);
if (!csd_tmp)
return -ENOMEM;
@@ -343,7 +343,7 @@ int mmc_send_cid(struct mmc_host *host, u32 *cid)
cid, MMC_SEND_CID);
}
- cid_tmp = kmalloc(16, GFP_KERNEL);
+ cid_tmp = kzalloc(16, GFP_KERNEL);
if (!cid_tmp)
return -ENOMEM;
@@ -374,7 +374,7 @@ int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd)
* As the ext_csd is so large and mostly unused, we don't store the
* raw block in mmc_card.
*/
- ext_csd = kmalloc(512, GFP_KERNEL);
+ ext_csd = kzalloc(512, GFP_KERNEL);
if (!ext_csd)
return -ENOMEM;