We should unlock and re-enable IRQs if this allocation fails.

Fixes: 259307074bfc ("ipmi: Add SMBus interface driver (SSIF) ")
Signed-off-by: Dan Carpenter <[email protected]>

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;
        }
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to