summaryrefslogtreecommitdiff
path: root/drivers/message/i2o/driver.c
diff options
context:
space:
mode:
authorMarkus Lidel <Markus.Lidel@shadowconnect.com>2006-01-06 08:19:32 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 16:33:54 (GMT)
commitdcceafe25a5f47cf69e5b46b4da6f15186ec8386 (patch)
tree4a3d581b2a1d239daf5d42cd9d2e1e5d838d817a /drivers/message/i2o/driver.c
parent24791bd48f643194d806654b587251b0f92233e8 (diff)
downloadlinux-dcceafe25a5f47cf69e5b46b4da6f15186ec8386.tar.xz
[PATCH] I2O: Bugfixes
- Removed some kmalloc's with __GFP_ZERO and replace it with memset() because it didn't work properly. - Fixed returned message frame in i2o_cfg_passthru() which caused raidutils to display wrong error message in case a disk was missing. - Fixed size of printk() in i2o_scsi.c. - Fixed get_device() and put_device() in probing of the I2O controller. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 25292b3..9c631c8 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)
/* cut of header from message size (in 32-bit words) */
size = (le32_to_cpu(msg->u.head[0]) >> 16) - 5;
- evt = kmalloc(size * 4 + sizeof(*evt), GFP_ATOMIC | __GFP_ZERO);
+ evt = kmalloc(size * 4 + sizeof(*evt), GFP_ATOMIC);
if (!evt)
return -ENOMEM;
+ memset(evt, 0, size * 4 + sizeof(*evt));
evt->size = size;
evt->tcntxt = le32_to_cpu(msg->u.s.tcntxt);
evt->event_indicator = le32_to_cpu(msg->body[0]);
- memcpy(&evt->tcntxt, &msg->u.s.tcntxt, size * 4);
+ memcpy(&evt->data, &msg->body[1], size * 4);
list_for_each_entry_safe(dev, tmp, &c->devices, list)
if (dev->lct_data.tid == tid) {