Staging: comedi: s626: Simplify a trivial if-return sequence
authorAbdul Hussain <habdul@visteon.com>
Mon, 22 Jun 2015 06:11:13 +0000 (06:11 +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/s626.c

index 781918d8d85f5452ad9d61fb28b2c95a9b4da13d..35f0f676eb28378979c0eacd745a4178db1901a6 100644 (file)
@@ -2852,11 +2852,7 @@ static int s626_auto_attach(struct comedi_device *dev,
        s->insn_read    = s626_enc_insn_read;
        s->insn_write   = s626_enc_insn_write;
 
-       ret = s626_initialize(dev);
-       if (ret)
-               return ret;
-
-       return 0;
+       return s626_initialize(dev);
 }
 
 static void s626_detach(struct comedi_device *dev)