aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2017-11-21 08:42:27 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2017-11-23 08:00:33 -0500
commit34c089e806793a66e450b11bd167db6047399fcd (patch)
tree43d0b76f5f121303eaf993db5ca76dd1ab6d8b77
parent5a787756b809888e8925d722862167f1229b58f7 (diff)
mmc: block: Fix missing blk_put_request()
Ensure blk_get_request() is paired with blk_put_request(). Fixes: 0493f6fe5bde ("mmc: block: Move boot partition locking into a driver op") Fixes: 627c3ccfb46a ("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>
-rw-r--r--drivers/mmc/core/block.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index ea80ff4cd7f9..f60939858586 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -236,6 +236,7 @@ static ssize_t power_ro_lock_store(struct device *dev,
236 req_to_mmc_queue_req(req)->drv_op = MMC_DRV_OP_BOOT_WP; 236 req_to_mmc_queue_req(req)->drv_op = MMC_DRV_OP_BOOT_WP;
237 blk_execute_rq(mq->queue, NULL, req, 0); 237 blk_execute_rq(mq->queue, NULL, req, 0);
238 ret = req_to_mmc_queue_req(req)->drv_op_result; 238 ret = req_to_mmc_queue_req(req)->drv_op_result;
239 blk_put_request(req);
239 240
240 if (!ret) { 241 if (!ret) {
241 pr_info("%s: Locking boot partition ro until next power on\n", 242 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)
2557 *val = ret; 2558 *val = ret;
2558 ret = 0; 2559 ret = 0;
2559 } 2560 }
2561 blk_put_request(req);
2560 2562
2561 return ret; 2563 return ret;
2562} 2564}
@@ -2587,6 +2589,7 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp)
2587 req_to_mmc_queue_req(req)->drv_op_data = &ext_csd; 2589 req_to_mmc_queue_req(req)->drv_op_data = &ext_csd;
2588 blk_execute_rq(mq->queue, NULL, req, 0); 2590 blk_execute_rq(mq->queue, NULL, req, 0);
2589 err = req_to_mmc_queue_req(req)->drv_op_result; 2591 err = req_to_mmc_queue_req(req)->drv_op_result;
2592 blk_put_request(req);
2590 if (err) { 2593 if (err) {
2591 pr_err("FAILED %d\n", err); 2594 pr_err("FAILED %d\n", err);
2592 goto out_free; 2595 goto out_free;