mmc: block: Fix missing blk_put_request()

Ensure blk_get_request() is paired with blk_put_request().

Fixes: 0493f6fe5b ("mmc: block: Move boot partition locking into a driver op")
Fixes: 627c3ccfb4 ("mmc: debugfs: Move block debugfs into block module")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Cc: stable@vger.kernel.org # 4.13+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Adrian Hunter 2017-11-21 15:42:27 +02:00 committed by Ulf Hansson
parent 5a787756b8
commit 34c089e806
1 changed files with 3 additions and 0 deletions

View File

@ -236,6 +236,7 @@ static ssize_t power_ro_lock_store(struct device *dev,
req_to_mmc_queue_req(req)->drv_op = MMC_DRV_OP_BOOT_WP; req_to_mmc_queue_req(req)->drv_op = MMC_DRV_OP_BOOT_WP;
blk_execute_rq(mq->queue, NULL, req, 0); blk_execute_rq(mq->queue, NULL, req, 0);
ret = req_to_mmc_queue_req(req)->drv_op_result; ret = req_to_mmc_queue_req(req)->drv_op_result;
blk_put_request(req);
if (!ret) { if (!ret) {
pr_info("%s: Locking boot partition ro until next power on\n", pr_info("%s: Locking boot partition ro until next power on\n",
@ -2557,6 +2558,7 @@ static int mmc_dbg_card_status_get(void *data, u64 *val)
*val = ret; *val = ret;
ret = 0; ret = 0;
} }
blk_put_request(req);
return ret; return ret;
} }
@ -2587,6 +2589,7 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp)
req_to_mmc_queue_req(req)->drv_op_data = &ext_csd; req_to_mmc_queue_req(req)->drv_op_data = &ext_csd;
blk_execute_rq(mq->queue, NULL, req, 0); blk_execute_rq(mq->queue, NULL, req, 0);
err = req_to_mmc_queue_req(req)->drv_op_result; err = req_to_mmc_queue_req(req)->drv_op_result;
blk_put_request(req);
if (err) { if (err) {
pr_err("FAILED %d\n", err); pr_err("FAILED %d\n", err);
goto out_free; goto out_free;