staging: comedi: Fix return flow
authorCristina Moraru <cristina.moraru09@gmail.com>
Tue, 20 Oct 2015 10:16:33 +0000 (13:16 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 02:16:20 +0000 (19:16 -0700)
Simplify function return flow. Issue found
with coccinelle.

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/daqboard2000.c

index 611b0a3ef5d7587b3962308cf4bbe1af843d9bc5..57ab6680e3aed4c1375820b652ca0938470adcc5 100644 (file)
@@ -713,12 +713,8 @@ static int daqboard2000_auto_attach(struct comedi_device *dev,
                return result;
 
        s = &dev->subdevices[2];
-       result = subdev_8255_init(dev, s, daqboard2000_8255_cb,
-                                 dioP2ExpansionIO8Bit);
-       if (result)
-               return result;
-
-       return 0;
+       return subdev_8255_init(dev, s, daqboard2000_8255_cb,
+                               dioP2ExpansionIO8Bit);
 }
 
 static void daqboard2000_detach(struct comedi_device *dev)