diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2013-06-23 22:49:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 16:33:28 -0700 |
commit | 9049f7932109f3fe189ffa8028f2e23f06a9bd0b (patch) | |
tree | 1f5dc15a64dc0d478148abe85909ae9476db20f8 /drivers/misc/mei/init.c | |
parent | c20c68d535409f2ff000415d5e0578529c016521 (diff) | |
download | lwn-9049f7932109f3fe189ffa8028f2e23f06a9bd0b.tar.gz lwn-9049f7932109f3fe189ffa8028f2e23f06a9bd0b.zip |
mei: check whether hw start has succeeded
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>
Diffstat (limited to 'drivers/misc/mei/init.c')
-rw-r--r-- | drivers/misc/mei/init.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index 15253886f37e..6fc573cef178 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c @@ -181,7 +181,12 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled) 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. */ |