Staging: comedi: fl512: Simplify a trivial if-return sequence
authorAbdul Hussain <habdul@visteon.com>
Mon, 22 Jun 2015 06:10:59 +0000 (06:10 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jul 2015 01:20:12 +0000 (18:20 -0700)
This patch simplify a trivial if-return sequence. Possibly combine with
a preceding function call.

Signed-off-by: Abdul Hussain <habdul@visteon.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/fl512.c

index e1f493241cd6434e631f40f9c5f8a42adeedff19..55cae61458cb975a2d3b3f5abf98e04611e021cb 100644 (file)
@@ -136,11 +136,7 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        s->range_table  = &range_fl512;
        s->insn_write   = fl512_ao_insn_write;
 
-       ret = comedi_alloc_subdev_readback(s);
-       if (ret)
-               return ret;
-
-       return 0;
+       return comedi_alloc_subdev_readback(s);
 }
 
 static struct comedi_driver fl512_driver = {