The code of meson_mmc_irq is going to use mmeson_host
before the santity check of WARN_ON. I believe this's not
the code's intention, fix it.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
{
struct meson_host *host = dev_id;
- struct mmc_request *mrq = host->mrq;
+ struct mmc_request *mrq;
struct mmc_command *cmd = host->cmd;
u32 irq_en, status, raw_status;
irqreturn_t ret = IRQ_HANDLED;
if (WARN_ON(!host))
return IRQ_NONE;
+ mrq = host->mrq;
+
if (WARN_ON(!mrq))
return IRQ_NONE;