Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755281AbcCBBm5 (ORCPT ); Tue, 1 Mar 2016 20:42:57 -0500 Received: from mail177-1.suw61.mandrillapp.com ([198.2.177.1]:60894 "EHLO mail177-1.suw61.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755133AbcCAXyH (ORCPT ); Tue, 1 Mar 2016 18:54:07 -0500 From: Greg Kroah-Hartman Subject: [PATCH 3.14 113/130] ACPI / PCI / hotplug: unlock in error path in acpiphp_enable_slot() X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Insu Yun , "Rafael J. Wysocki" Message-Id: <20160301234503.788480811@linuxfoundation.org> In-Reply-To: <20160301234459.768886030@linuxfoundation.org> References: <20160301234459.768886030@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.b109c4df5e25484293f6cfc23a3e6d97 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:53:42 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 976 Lines: 34 3.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Insu Yun commit 2c3033a0664dfae91e1dee7fabac10f24354b958 upstream. In acpiphp_enable_slot(), there is a missing unlock path when error occurred. It needs to be unlocked before returning an error. Signed-off-by: Insu Yun Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/acpiphp_glue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -1133,8 +1133,10 @@ int acpiphp_enable_slot(struct acpiphp_s { pci_lock_rescan_remove(); - if (slot->flags & SLOT_IS_GOING_AWAY) + if (slot->flags & SLOT_IS_GOING_AWAY) { + pci_unlock_rescan_remove(); return -ENODEV; + } mutex_lock(&slot->crit_sect); /* configure all functions */