aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/i2o/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/i2o/driver.c')
-rw-r--r--drivers/message/i2o/driver.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/message/i2o/driver.c b/drivers/message/i2o/driver.c
index 25292b36e2d9..9c631c873dc6 100644
--- a/drivers/message/i2o/driver.c
+++ b/drivers/message/i2o/driver.c
@@ -217,14 +217,15 @@ int i2o_driver_dispatch(struct i2o_controller *c, u32 m)
217 /* cut of header from message size (in 32-bit words) */ 217 /* cut of header from message size (in 32-bit words) */
218 size = (le32_to_cpu(msg->u.head[0]) >> 16) - 5; 218 size = (le32_to_cpu(msg->u.head[0]) >> 16) - 5;
219 219
220 evt = kmalloc(size * 4 + sizeof(*evt), GFP_ATOMIC | __GFP_ZERO); 220 evt = kmalloc(size * 4 + sizeof(*evt), GFP_ATOMIC);
221 if (!evt) 221 if (!evt)
222 return -ENOMEM; 222 return -ENOMEM;
223 memset(evt, 0, size * 4 + sizeof(*evt));
223 224
224 evt->size = size; 225 evt->size = size;
225 evt->tcntxt = le32_to_cpu(msg->u.s.tcntxt); 226 evt->tcntxt = le32_to_cpu(msg->u.s.tcntxt);
226 evt->event_indicator = le32_to_cpu(msg->body[0]); 227 evt->event_indicator = le32_to_cpu(msg->body[0]);
227 memcpy(&evt->tcntxt, &msg->u.s.tcntxt, size * 4); 228 memcpy(&evt->data, &msg->body[1], size * 4);
228 229
229 list_for_each_entry_safe(dev, tmp, &c->devices, list) 230 list_for_each_entry_safe(dev, tmp, &c->devices, list)
230 if (dev->lct_data.tid == tid) { 231 if (dev->lct_data.tid == tid) {