* [patch] i2o: trivial: cleanup some exit paths
@ 2010-04-23 20:19 Dan Carpenter
2010-04-26 9:52 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-04-23 20:19 UTC (permalink / raw)
To: kernel-janitors
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>
---
There isn't really a maintainer for this code and Alan Cox suggested
that I just send it through the trivial tree.
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index 11073fa..d33693c 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)
{
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] i2o: trivial: cleanup some exit paths
2010-04-23 20:19 [patch] i2o: trivial: cleanup some exit paths Dan Carpenter
@ 2010-04-26 9:52 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2010-04-26 9:52 UTC (permalink / raw)
To: kernel-janitors
On Fri, 23 Apr 2010, Dan Carpenter wrote:
> 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>
Applied, thank you.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-26 9:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-23 20:19 [patch] i2o: trivial: cleanup some exit paths Dan Carpenter
2010-04-26 9:52 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).