@@ -626,7 +626,7 @@ static int meson_mmc_read_resp(struct mmc_host *mmc, struct mmc_command *cmd)
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;
@@ -634,6 +634,8 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
if (WARN_ON(!host))
return IRQ_NONE;
+ mrq = host->mrq;
+
if (WARN_ON(!mrq))
return IRQ_NONE;
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> --- drivers/mmc/host/meson-gxbb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)