From d863251e9bcc6f541c9df403e60c367ffdfb9e92 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Sat, 17 Jan 2009 16:23:55 +0100 Subject: [PATCH] --- yaml --- r: 130073 b: refs/heads/master c: c2fdd36b550659f5ac2240d1f5a83ffa1a092289 h: refs/heads/master i: 130071: 03c15a0aa2d173cbdaa24e0f77fb8c7f3838b7e8 v: v3 --- [refs] | 2 +- trunk/drivers/pci/hotplug/pciehp_core.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 2ff4bb7f02b5..ff3382eedc23 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: aa8c6c93747f7b55fa11e1624fec8ca33763a805 +refs/heads/master: c2fdd36b550659f5ac2240d1f5a83ffa1a092289 diff --git a/trunk/drivers/pci/hotplug/pciehp_core.c b/trunk/drivers/pci/hotplug/pciehp_core.c index 5482d4ed8256..c2485542f543 100644 --- a/trunk/drivers/pci/hotplug/pciehp_core.c +++ b/trunk/drivers/pci/hotplug/pciehp_core.c @@ -126,8 +126,10 @@ static int set_lock_status(struct hotplug_slot *hotplug_slot, u8 status) mutex_lock(&slot->ctrl->crit_sect); /* has it been >1 sec since our last toggle? */ - if ((get_seconds() - slot->last_emi_toggle) < 1) + if ((get_seconds() - slot->last_emi_toggle) < 1) { + mutex_unlock(&slot->ctrl->crit_sect); return -EINVAL; + } /* see what our current state is */ retval = get_lock_status(hotplug_slot, &value);