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

index a208cb3484375d8868d6ab4f3701876cb5b5a566..d9de83ab026712792a61a6cb806326316573cddb 100644 (file)
@@ -55,11 +55,7 @@ static int dio24_auto_attach(struct comedi_device *dev,
 
        /* 8255 dio */
        s = &dev->subdevices[0];
-       ret = subdev_8255_init(dev, s, NULL, 0x00);
-       if (ret)
-               return ret;
-
-       return 0;
+       return subdev_8255_init(dev, s, NULL, 0x00);
 }
 
 static struct comedi_driver driver_dio24 = {