diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index c32d45209cc68ca9e45a4e57895be1c0406ebe41..f7f3abbe12b6e2a8cc7058397ce77dc0c3cc7029 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c @@ -147,6 +147,10 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled) dev->dev_state != MEI_DEV_POWER_DOWN && dev->dev_state != MEI_DEV_POWER_UP); + if (unexpected) + dev_warn(&dev->pdev->dev, "unexpected reset: dev_state = %s\n", + mei_dev_state_str(dev->dev_state)); + ret = mei_hw_reset(dev, interrupts_enabled); if (ret) { dev_err(&dev->pdev->dev, "hw reset failed disabling the device\n"); @@ -185,10 +189,6 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled) dev->rd_msg_hdr = 0; dev->wd_pending = false; - if (unexpected) - dev_warn(&dev->pdev->dev, "unexpected reset: dev_state = %s\n", - mei_dev_state_str(dev->dev_state)); - if (!interrupts_enabled) { dev_dbg(&dev->pdev->dev, "intr not enabled end of reset\n"); return;