aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/mei/init.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2011-06-13 16:39:31 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-27 14:19:21 -0700
commita534bb6eea72c0d082dd2faab85450e5554ba1c8 (patch)
tree45e650f49f1df01f2f8ff96e37ab83fbb54fc570 /drivers/staging/mei/init.c
parentfdf2df0e8ce634c9ee5f740a9303e8518ca78932 (diff)
Staging: mei: fix suspend failure
wait_event_interruptible_timeout return value was wrongly used. The remaining timeout was used as the error code. This fix translated wait_event_interruptible_timeout return value into error code that can be propagated. [10291.674121] pci_pm_suspend(): mei_pci_suspend+0x0/0x8b [mei] returns 2500 It's thinkpad t400 with 00:03.0 Communication controller [0780]: Intel Corporation Mobile 4 Series Chipset MEI Controller [8086:2a44] (rev 07) Reported-by: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/mei/init.c')
-rw-r--r--drivers/staging/mei/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/mei/init.c b/drivers/staging/mei/init.c
index d1ffa32cd14..685fcf63964 100644
--- a/drivers/staging/mei/init.c
+++ b/drivers/staging/mei/init.c
@@ -189,7 +189,7 @@ int mei_hw_init(struct mei_device *dev)
mutex_lock(&dev->device_lock);
}
- if (!err && !dev->recvd_msg) {
+ if (err <= 0 && !dev->recvd_msg) {
dev->mei_state = MEI_DISABLED;
dev_dbg(&dev->pdev->dev,
"wait_event_interruptible_timeout failed"