aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/debugfs.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-10-17 05:48:23 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-11-10 06:40:44 -0500
commitb2cada73a8ff2ee9129557c724f7e53bf55e48f8 (patch)
treece7635c42deb4bccc58e33e071359ad9c8ecc6d5 /drivers/mmc/core/debugfs.c
parent86817ffb492b509b87b20be4a4f1afc74f04dccf (diff)
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)
291 if (!buf) 291 if (!buf)
292 return -ENOMEM; 292 return -ENOMEM;
293 293
294 ext_csd = kmalloc(512, GFP_KERNEL);
295 if (!ext_csd) {
296 err = -ENOMEM;
297 goto out_free;
298 }
299
300 mmc_get_card(card); 294 mmc_get_card(card);
301 err = mmc_send_ext_csd(card, ext_csd); 295 err = mmc_get_ext_csd(card, &ext_csd);
302 mmc_put_card(card); 296 mmc_put_card(card);
303 if (err) 297 if (err)
304 goto out_free; 298 goto out_free;
@@ -314,7 +308,6 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp)
314 308
315out_free: 309out_free:
316 kfree(buf); 310 kfree(buf);
317 kfree(ext_csd);
318 return err; 311 return err;
319} 312}
320 313