Merge "mmc: core: Fix unclocked access in get_xfer_remain/stop_request"

This commit is contained in:
Linux Build Service Account
2014-10-29 22:35:36 -07:00
committed by Gerrit - the friendly Code Review server
+4
View File
@@ -616,8 +616,10 @@ static bool mmc_should_stop_curr_req(struct mmc_host *host)
(host->areq->cmd_flags & REQ_FUA))
return false;
mmc_host_clk_hold(host);
remainder = (host->ops->get_xfer_remain) ?
host->ops->get_xfer_remain(host) : -1;
mmc_host_clk_release(host);
return (remainder > 0);
}
@@ -642,6 +644,7 @@ static int mmc_stop_request(struct mmc_host *host)
mmc_hostname(host));
return -ENOTSUPP;
}
mmc_host_clk_hold(host);
err = host->ops->stop_request(host);
if (err) {
pr_err("%s: Call to host->ops->stop_request() failed (%d)\n",
@@ -676,6 +679,7 @@ static int mmc_stop_request(struct mmc_host *host)
goto out;
}
out:
mmc_host_clk_release(host);
return err;
}