mmc: core: Initialize SET_BLOCK_COUNT request fields
authorAndrew Gabbasov <andrew_gabbasov@mentor.com>
Wed, 1 Oct 2014 12:14:09 +0000 (07:14 -0500)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 10 Nov 2014 11:40:27 +0000 (12:40 +0100)
Some request fields are initialized just before request processing
for sanity purposes. This is done for command, data, and stop parts
of the request, but not for sbc (set block count) part. Add such
initialization for that part too.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/core.c

index f26a5f1d926dd7e6a79ec1b9f87f7be4fd691994..9f1ecc4b8c82e49cf81ab3e9e23066ff6b776189 100644 (file)
@@ -214,6 +214,10 @@ mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
 
        mrq->cmd->error = 0;
        mrq->cmd->mrq = mrq;
+       if (mrq->sbc) {
+               mrq->sbc->error = 0;
+               mrq->sbc->mrq = mrq;
+       }
        if (mrq->data) {
                BUG_ON(mrq->data->blksz > host->max_blk_size);
                BUG_ON(mrq->data->blocks > host->max_blk_count);