hw start may fail therefore the reset flow has
to check for the return value
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
return;
}
- mei_hw_start(dev);
+ ret = mei_hw_start(dev);
+ if (ret) {
+ dev_err(&dev->pdev->dev, "hw_start failed disabling the device\n");
+ dev->dev_state = MEI_DEV_DISABLED;
+ return;
+ }
dev_dbg(&dev->pdev->dev, "link is established start sending messages.\n");
/* link is established * start sending messages. */
return dev->ops->hw_reset(dev, enable);
}
-static inline void mei_hw_start(struct mei_device *dev)
+static inline int mei_hw_start(struct mei_device *dev)
{
- dev->ops->hw_start(dev);
+ return dev->ops->hw_start(dev);
}
static inline void mei_clear_interrupts(struct mei_device *dev)