Loading drivers/mmc/core/core.c +3 −14 Original line number Diff line number Diff line Loading @@ -731,27 +731,16 @@ int mmc_read_bkops_status(struct mmc_card *card) int err; u8 *ext_csd; /* * In future work, we should consider storing the entire ext_csd. */ ext_csd = kmalloc(512, GFP_KERNEL); if (!ext_csd) { pr_err("%s: could not allocate buffer to receive the ext_csd.\n", mmc_hostname(card->host)); return -ENOMEM; } mmc_claim_host(card->host); err = mmc_send_ext_csd(card, ext_csd); err = mmc_get_ext_csd(card, &ext_csd); mmc_release_host(card->host); if (err) goto out; return err; card->ext_csd.raw_bkops_status = ext_csd[EXT_CSD_BKOPS_STATUS]; card->ext_csd.raw_exception_status = ext_csd[EXT_CSD_EXP_EVENTS_STATUS]; out: kfree(ext_csd); return err; return 0; } EXPORT_SYMBOL(mmc_read_bkops_status); Loading drivers/mmc/core/debugfs.c +1 −8 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; } Loading Loading
drivers/mmc/core/core.c +3 −14 Original line number Diff line number Diff line Loading @@ -731,27 +731,16 @@ int mmc_read_bkops_status(struct mmc_card *card) int err; u8 *ext_csd; /* * In future work, we should consider storing the entire ext_csd. */ ext_csd = kmalloc(512, GFP_KERNEL); if (!ext_csd) { pr_err("%s: could not allocate buffer to receive the ext_csd.\n", mmc_hostname(card->host)); return -ENOMEM; } mmc_claim_host(card->host); err = mmc_send_ext_csd(card, ext_csd); err = mmc_get_ext_csd(card, &ext_csd); mmc_release_host(card->host); if (err) goto out; return err; card->ext_csd.raw_bkops_status = ext_csd[EXT_CSD_BKOPS_STATUS]; card->ext_csd.raw_exception_status = ext_csd[EXT_CSD_EXP_EVENTS_STATUS]; out: kfree(ext_csd); return err; return 0; } EXPORT_SYMBOL(mmc_read_bkops_status); Loading
drivers/mmc/core/debugfs.c +1 −8 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; } Loading