]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Staging: comedi: dmm32at: Simplify a trivial if-return sequence
authorAbdul Hussain <habdul@visteon.com>
Mon, 22 Jun 2015 06:10:56 +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/dmm32at.c

index bb2883c83afaa010b713e51fc96ff346208b824b..958c0d4aae5c0acabbbea3f6623dd9e173a45e0b 100644 (file)
@@ -607,11 +607,7 @@ static int dmm32at_attach(struct comedi_device *dev,
 
        /* Digital I/O subdevice */
        s = &dev->subdevices[2];
-       ret = subdev_8255_init(dev, s, dmm32at_8255_io, DMM32AT_8255_IOBASE);
-       if (ret)
-               return ret;
-
-       return 0;
+       return subdev_8255_init(dev, s, dmm32at_8255_io, DMM32AT_8255_IOBASE);
 }
 
 static struct comedi_driver dmm32at_driver = {