diff options
Diffstat (limited to 'drivers/message/i2o/i2o_config.c')
-rw-r--r-- | drivers/message/i2o/i2o_config.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c index 7d23e082bf26..1de30d711671 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] = |
@@ -516,7 +520,6 @@ static int i2o_cfg_evt_get(unsigned long arg, struct file *fp) | |||
516 | return 0; | 520 | return 0; |
517 | } | 521 | } |
518 | 522 | ||
519 | #ifdef CONFIG_I2O_EXT_ADAPTEC | ||
520 | #ifdef CONFIG_COMPAT | 523 | #ifdef CONFIG_COMPAT |
521 | static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, | 524 | static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, |
522 | unsigned long arg) | 525 | unsigned long arg) |
@@ -759,6 +762,7 @@ static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd, | |||
759 | 762 | ||
760 | #endif | 763 | #endif |
761 | 764 | ||
765 | #ifdef CONFIG_I2O_EXT_ADAPTEC | ||
762 | static int i2o_cfg_passthru(unsigned long arg) | 766 | static int i2o_cfg_passthru(unsigned long arg) |
763 | { | 767 | { |
764 | struct i2o_cmd_passthru __user *cmd = | 768 | struct i2o_cmd_passthru __user *cmd = |