Return-Path: Received: from mail-by2nam03on0113.outbound.protection.outlook.com ([104.47.42.113]:31931 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966040AbeCSQGs (ORCPT ); Mon, 19 Mar 2018 12:06:48 -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.4 011/167] ipmi_ssif: unlock on allocation failure Date: Mon, 19 Mar 2018 16:05:33 +0000 Message-ID: <20180319160513.16384-11-alexander.levin@microsoft.com> References: <20180319160513.16384-1-alexander.levin@microsoft.com> In-Reply-To: <20180319160513.16384-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 f53e8ba2c718..83c206f0fc98 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