]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ipmi_ssif: unlock on allocation failure
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 5 May 2017 05:33:24 +0000 (08:33 +0300)
committerCorey Minyard <cminyard@mvista.com>
Mon, 8 May 2017 19:01:41 +0000 (14:01 -0500)
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>
drivers/char/ipmi/ipmi_ssif.c

index 0b22a9be5029155265c0d648e14f1833a5ba4ada..6dd6476ea5d3103926374b7cbbacf47dbb5096dc 100644 (file)
@@ -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;
        }