[PATCH 3.19.y-ckt 055/130] mmc: block: Add missing mmc_blk_put() in power_ro_lock_show()

From: Kamal Mostafa
Date: Thu Aug 27 2015 - 18:37:48 EST


3.19.8-ckt6 -stable review patch. If anyone has any objections, please let me know.

------------------

From: Tomas Winkler <tomas.winkler@xxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
Signed-off-by: Kamal Mostafa <kamal@xxxxxxxxxxxxx>
---
drivers/mmc/card/block.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index c972b97..28fb2ed 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -208,6 +208,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;
}

--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/