diff options
-rw-r--r-- | drivers/message/i2o/i2o_config.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c index 7d23e082bf26..685d7a450720 100644 --- a/drivers/message/i2o/i2o_config.c +++ b/drivers/message/i2o/i2o_config.c | |||
@@ -265,7 +265,11 @@ static int i2o_cfg_swdl(unsigned long arg) | |||
265 | return -ENOMEM; | 265 | return -ENOMEM; |
266 | } | 266 | } |
267 | 267 | ||
268 | __copy_from_user(buffer.virt, kxfer.buf, fragsize); | 268 | if (__copy_from_user(buffer.virt, kxfer.buf, fragsize)) { |
269 | i2o_msg_nop(c, msg); | ||
270 | i2o_dma_free(&c->pdev->dev, &buffer); | ||
271 | return -EFAULT; | ||
272 | } | ||
269 | 273 | ||
270 | msg->u.head[0] = cpu_to_le32(NINE_WORD_MSG_SIZE | SGL_OFFSET_7); | 274 | msg->u.head[0] = cpu_to_le32(NINE_WORD_MSG_SIZE | SGL_OFFSET_7); |
271 | msg->u.head[1] = | 275 | msg->u.head[1] = |