summaryrefslogtreecommitdiff
path: root/drivers/mmc/core/debugfs.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-10-17 13:48:23 +0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-11-10 14:40:44 +0300
commitb2cada73a8ff2ee9129557c724f7e53bf55e48f8 (patch)
treece7635c42deb4bccc58e33e071359ad9c8ecc6d5 /drivers/mmc/core/debugfs.c
parent86817ffb492b509b87b20be4a4f1afc74f04dccf (diff)
downloadlinux-b2cada73a8ff2ee9129557c724f7e53bf55e48f8.tar.xz
mmc: core: Use mmc_get_ext_csd() instead of mmc_send_ext_csd()
By using mmc_get_ext_csd() in favor of mmc_send_ext_csd, we decrease code duplication. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/debugfs.c')
-rw-r--r--drivers/mmc/core/debugfs.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c
index 91eb16223246..e9142108a6c6 100644
--- a/drivers/mmc/core/debugfs.c
+++ b/drivers/mmc/core/debugfs.c
@@ -291,14 +291,8 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp)
if (!buf)
return -ENOMEM;
- ext_csd = kmalloc(512, GFP_KERNEL);
- if (!ext_csd) {
- err = -ENOMEM;
- goto out_free;
- }
-
mmc_get_card(card);
- err = mmc_send_ext_csd(card, ext_csd);
+ err = mmc_get_ext_csd(card, &ext_csd);
mmc_put_card(card);
if (err)
goto out_free;
@@ -314,7 +308,6 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp)
out_free:
kfree(buf);
- kfree(ext_csd);
return err;
}