staging/mei: don't use read buffer for writing
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 6 Mar 2012 20:34:32 +0000 (22:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Mar 2012 21:45:42 +0000 (13:45 -0800)
In mei_irq_thread_read_bus_message we reused mei_hdr
allocated on read buffer to write the stop message.
There is no bug associated with this but for code
clarity we use write buffer also for message header.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mei/interrupt.c

index ce14e399adabc057833dfb88234071b6681166ce..e70bc3714c13d67d4f8cfb4c0905d5014cdc9833 100644 (file)
@@ -652,6 +652,7 @@ static void mei_irq_thread_read_bus_message(struct mei_device *dev,
                } else {
                        dev->version = version_res->me_max_version;
                        /* send stop message */
+                       mei_hdr = (struct mei_msg_hdr *)&dev->wr_msg_buf[0];
                        mei_hdr->host_addr = 0;
                        mei_hdr->me_addr = 0;
                        mei_hdr->length = sizeof(struct hbm_host_stop_request);