Commit 09dd7982 authored by Corey Minyard's avatar Corey Minyard
Browse files

ipmi:si: Return state to normal if message allocation fails



There were places where nothing would get started if a message
allocation failed, so the driver needs to return to normal state.

Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarCorey Minyard <corey@minyard.net>
parent c4cca236
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -497,15 +497,19 @@ static void handle_flags(struct smi_info *smi_info)
	} else if (smi_info->msg_flags & RECEIVE_MSG_AVAIL) {
		/* Messages available. */
		smi_info->curr_msg = alloc_msg_handle_irq(smi_info);
		if (!smi_info->curr_msg)
		if (!smi_info->curr_msg) {
			smi_info->si_state = SI_NORMAL;
			return;
		}

		start_getting_msg_queue(smi_info);
	} else if (smi_info->msg_flags & EVENT_MSG_BUFFER_FULL) {
		/* Events available. */
		smi_info->curr_msg = alloc_msg_handle_irq(smi_info);
		if (!smi_info->curr_msg)
		if (!smi_info->curr_msg) {
			smi_info->si_state = SI_NORMAL;
			return;
		}

		start_getting_events(smi_info);
	} else if (smi_info->msg_flags & OEM_DATA_AVAIL &&