summaryrefslogtreecommitdiffstats
path: root/hw/bt.c
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2015-07-01 16:53:09 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-07-03 17:09:43 +1000
commit545c2d925d92ce0c0f50436596e5f6bb2cda8b81 (patch)
tree73816f6488c1008db744d3a7d948f8e178c497da /hw/bt.c
parentf0e3f5336baf3e51705c6faa9769597fb46f2657 (diff)
downloadtalos-skiboot-545c2d925d92ce0c0f50436596e5f6bb2cda8b81.tar.gz
talos-skiboot-545c2d925d92ce0c0f50436596e5f6bb2cda8b81.zip
bt: Check before dequeuing messages with ipmi_dequeue_msg
We will soon expose the dequeue message function which deletes previously queued messages from the message queue. It could help catch a few bugs by doing some extra checks. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/bt.c')
-rw-r--r--hw/bt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/bt.c b/hw/bt.c
index 610aa3f2..9f6244a5 100644
--- a/hw/bt.c
+++ b/hw/bt.c
@@ -490,7 +490,7 @@ static int bt_del_ipmi_msg(struct ipmi_msg *ipmi_msg)
struct bt_msg *bt_msg = container_of(ipmi_msg, struct bt_msg, ipmi_msg);
lock(&bt.lock);
- list_del(&bt_msg->link);
+ list_del_from(&bt.msgq, &bt_msg->link);
bt.queue_len--;
bt_send_and_unlock();
return 0;
OpenPOWER on IntegriCloud