summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2015-07-16 16:50:45 +0300
committerZefan Li <lizefan@huawei.com>2016-03-21 04:17:48 +0300
commitf48b7031214db56ba92de547a77ee7c0b1b72f36 (patch)
tree4c4a7bddb70991832cb830f923ec0e95312da323
parent4adbd632ea76c890371a76557e7912afdc586e1b (diff)
downloadlinux-f48b7031214db56ba92de547a77ee7c0b1b72f36.tar.xz
mmc: block: Add missing mmc_blk_put() in power_ro_lock_show()
commit 9098f84cced870f54d8c410dd2444cfa61467fa0 upstream. Enclosing mmc_blk_put() is missing in power_ro_lock_show() sysfs handler, let's add it. Fixes: add710eaa886 ("mmc: boot partition ro lock support") Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Zefan Li <lizefan@huawei.com>
-rw-r--r--drivers/mmc/card/block.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 47a789ea26bc..b4277ac6939f 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -182,6 +182,8 @@ static ssize_t power_ro_lock_show(struct device *dev,
ret = snprintf(buf, PAGE_SIZE, "%d\n", locked);
+ mmc_blk_put(md);
+
return ret;
}