diff options
author | Dan Carpenter | 2010-04-23 22:19:13 +0200 |
---|---|---|
committer | Jiri Kosina | 2010-04-26 11:51:59 +0200 |
commit | b1ffdc8f3d8c8913388ca97dfdf064c87940dd72 (patch) | |
tree | fb03112d670022f6ad6e42cfd097faf0c1e2946d /drivers/message/i2o | |
parent | a33f32244d8550da8b4a26e277ce07d5c6d158b5 (diff) |
i2o: cleanup some exit paths
This is just a cleanup and doesn't change how the code works.
The original code had a mix of returns and gotos so I changed everything
to just return directly.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/message/i2o')
-rw-r--r-- | drivers/message/i2o/i2o_config.c | 16 |
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) int ret = 0; if (copy_from_user(&kxfer, pxfer, sizeof(struct i2o_sw_xfer))) - goto return_fault; + return -EFAULT; if (get_user(swlen, kxfer.swlen) < 0) - goto return_fault; + return -EFAULT; if (get_user(maxfrag, kxfer.maxfrag) < 0) - goto return_fault; + return -EFAULT; if (get_user(curfrag, kxfer.curfrag) < 0) - goto return_fault; + return -EFAULT; if (curfrag == maxfrag) fragsize = swlen - (maxfrag - 1) * 8192; if (!kxfer.buf) - goto return_fault; + return -EFAULT; c = i2o_find_iop(kxfer.iop); if (!c) @@ -373,12 +373,8 @@ static int i2o_cfg_swul(unsigned long arg) i2o_dma_free(&c->pdev->dev, &buffer); - return_ret: return ret; - return_fault: - ret = -EFAULT; - goto return_ret; -}; +} static int i2o_cfg_swdel(unsigned long arg) { |