mmc: sdhci: Move host->data warning
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 29 Jun 2016 13:24:26 +0000 (16:24 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 25 Jul 2016 08:34:39 +0000 (10:34 +0200)
In order to support commands during data transfer, it will be possible
that host->data is not NULL when preparing a new request. Move a warning
that assumes otherwise.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci.c

index 3835b20..ee4363b 100644 (file)
@@ -744,14 +744,14 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd)
        u8 ctrl;
        struct mmc_data *data = cmd->data;
 
-       WARN_ON(host->data);
-
        if (data || (cmd->flags & MMC_RSP_BUSY))
                sdhci_set_timeout(host, cmd);
 
        if (!data)
                return;
 
+       WARN_ON(host->data);
+
        /* Sanity checks */
        BUG_ON(data->blksz * data->blocks > 524288);
        BUG_ON(data->blksz > host->mmc->max_blk_size);