aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/i2o/i2o_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/i2o/i2o_config.c')
-rw-r--r--drivers/message/i2o/i2o_config.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index 11073fa3d9f4..d33693c13368 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -314,22 +314,22 @@ static int i2o_cfg_swul(unsigned long arg)
314 int ret = 0; 314 int ret = 0;
315 315
316 if (copy_from_user(&kxfer, pxfer, sizeof(struct i2o_sw_xfer))) 316 if (copy_from_user(&kxfer, pxfer, sizeof(struct i2o_sw_xfer)))
317 goto return_fault; 317 return -EFAULT;
318 318
319 if (get_user(swlen, kxfer.swlen) < 0) 319 if (get_user(swlen, kxfer.swlen) < 0)
320 goto return_fault; 320 return -EFAULT;
321 321
322 if (get_user(maxfrag, kxfer.maxfrag) < 0) 322 if (get_user(maxfrag, kxfer.maxfrag) < 0)
323 goto return_fault; 323 return -EFAULT;
324 324
325 if (get_user(curfrag, kxfer.curfrag) < 0) 325 if (get_user(curfrag, kxfer.curfrag) < 0)
326 goto return_fault; 326 return -EFAULT;
327 327
328 if (curfrag == maxfrag) 328 if (curfrag == maxfrag)
329 fragsize = swlen - (maxfrag - 1) * 8192; 329 fragsize = swlen - (maxfrag - 1) * 8192;
330 330
331 if (!kxfer.buf) 331 if (!kxfer.buf)
332 goto return_fault; 332 return -EFAULT;
333 333
334 c = i2o_find_iop(kxfer.iop); 334 c = i2o_find_iop(kxfer.iop);
335 if (!c) 335 if (!c)
@@ -373,12 +373,8 @@ static int i2o_cfg_swul(unsigned long arg)
373 373
374 i2o_dma_free(&c->pdev->dev, &buffer); 374 i2o_dma_free(&c->pdev->dev, &buffer);
375 375
376 return_ret:
377 return ret; 376 return ret;
378 return_fault: 377}
379 ret = -EFAULT;
380 goto return_ret;
381};
382 378
383static int i2o_cfg_swdel(unsigned long arg) 379static int i2o_cfg_swdel(unsigned long arg)
384{ 380{