mmc: block: Add missing mmc_blk_put() in power_ro_lock_show()
authorTomas Winkler <tomas.winkler@intel.com>
Thu, 16 Jul 2015 13:50:45 +0000 (15:50 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 24 Jul 2015 08:18:34 +0000 (10:18 +0200)
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>
drivers/mmc/card/block.c

index c9c3d20b784b669bf130cffb716b8525470738fa..a1b820fcb2a6ff60093011d696761ba4ca15e584 100644 (file)
@@ -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;
 }