i2o: cleanup exit paths
PATCH 1/1 i2o: cleanup 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.
drivers/message/i2o/i2o_config.c +6 -10
@@ -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) {
Quoted 2 lines · On Mon, 19 Apr 2010 12:32:09 -0500 (CDT) Christoph Lameter…
Reviewed-by Christoph Lameter <[email protected]>
Not sure I am the person to Cc. I've got no I2O hardware nor touched it for a while. It looks sane to me but is un-owned really so I'd send it either directly or via the trivial patch maintainer .
Quoted 3 lines · Alan Cox
Not sure I am the person to Cc. I've got no I2O hardware nor touched it for a while. It looks sane to me but is un-owned really so I'd send it either directly or via the trivial patch maintainer .
I guess he just randomly picked a couple of kernel developers.
Quoted 7 lines · Christoph Lameter
Quoted 3 lines · Alan Cox
Not sure I am the person to Cc. I've got no I2O hardware nor touched it for a while. It looks sane to me but is un-owned really so I'd send it either directly or via the trivial patch maintainer .
I guess he just randomly picked a couple of kernel developers.
./scripts/get_maintainer.pl
So... Christoph, I did notice that I've been CC'ing you a lot recently, but I figured you had got a promotion or something. I'll remove you from the CC list from here out. Probably you should have refused to ack Tejun's slab.h patch. The get_maintainer.pl script now thinks you two own 97% of the kernel...
regards,
dan carpenter
Quoted 5 lines · Dan Carpenter
So... Christoph, I did notice that I've been CC'ing you a lot recently, but I figured you had got a promotion or something. I'll remove you from the CC list from here out. Probably you should have refused to ack Tejun's
slab.hpatch. The get_maintainer.pl script now thinks you two own 97% of the kernel...
Hehe. I finally made it.