summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-05-05 07:33:24 +0200
committerCorey Minyard <cminyard@mvista.com>2017-05-08 21:01:41 +0200
commitcf9806f32ef63b745f2486e0dbb2ac21f4ca44f0 (patch)
tree11ba90783cafc0fe28779119629b6754935e53d1 /drivers/char
parentdocs: complete bumping minimal GNU Make version to 3.81 (diff)
downloadlinux-cf9806f32ef63b745f2486e0dbb2ac21f4ca44f0.tar.xz
linux-cf9806f32ef63b745f2486e0dbb2ac21f4ca44f0.zip
ipmi_ssif: unlock on allocation failure
We should unlock and re-enable IRQs if this allocation fails. Fixes: 259307074bfc ("ipmi: Add SMBus interface driver (SSIF) ") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ipmi/ipmi_ssif.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index 0b22a9be5029..6dd6476ea5d3 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -408,6 +408,7 @@ static void start_event_fetch(struct ssif_info *ssif_info, unsigned long *flags)
msg = ipmi_alloc_smi_msg();
if (!msg) {
ssif_info->ssif_state = SSIF_NORMAL;
+ ipmi_ssif_unlock_cond(ssif_info, flags);
return;
}
@@ -430,6 +431,7 @@ static void start_recv_msg_fetch(struct ssif_info *ssif_info,
msg = ipmi_alloc_smi_msg();
if (!msg) {
ssif_info->ssif_state = SSIF_NORMAL;
+ ipmi_ssif_unlock_cond(ssif_info, flags);
return;
}