Return-Path: Received: from mail-bn3nam01on0122.outbound.protection.outlook.com ([104.47.33.122]:16414 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934756AbeCSP6T (ORCPT ); Mon, 19 Mar 2018 11:58:19 -0400 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Dan Carpenter , Corey Minyard , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 017/281] ipmi_ssif: unlock on allocation failure Date: Mon, 19 Mar 2018 15:58:09 +0000 Message-ID: <20180319155742.13731-17-alexander.levin@microsoft.com> References: <20180319155742.13731-1-alexander.levin@microsoft.com> In-Reply-To: <20180319155742.13731-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Dan Carpenter [ Upstream commit cf9806f32ef63b745f2486e0dbb2ac21f4ca44f0 ] We should unlock and re-enable IRQs if this allocation fails. Fixes: 259307074bfc ("ipmi: Add SMBus interface driver (SSIF) ") Signed-off-by: Dan Carpenter Signed-off-by: Corey Minyard Signed-off-by: Sasha Levin --- drivers/char/ipmi/ipmi_ssif.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index 510fc104bcdc..f11c1c7e84c6 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c @@ -409,6 +409,7 @@ static void start_event_fetch(struct ssif_info *ssif_in= fo, unsigned long *flags) msg =3D ipmi_alloc_smi_msg(); if (!msg) { ssif_info->ssif_state =3D SSIF_NORMAL; + ipmi_ssif_unlock_cond(ssif_info, flags); return; } =20 @@ -431,6 +432,7 @@ static void start_recv_msg_fetch(struct ssif_info *ssif= _info, msg =3D ipmi_alloc_smi_msg(); if (!msg) { ssif_info->ssif_state =3D SSIF_NORMAL; + ipmi_ssif_unlock_cond(ssif_info, flags); return; } =20 --=20 2.14.1