Staging: comedi: adv_pci1724: Remove redundant return statements
authorAbhishek Sharma <asharm14@visteon.com>
Mon, 1 Jun 2015 06:06:53 +0000 (06:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jun 2015 20:21:37 +0000 (13:21 -0700)
Replace unnecessary conditional checks for variable 'ret' and replace
by single return statement.

Signed-off-by: Abhishek Sharma <asharm14@visteon.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/adv_pci1724.c

index f7a7dab013db152bb7bfca43177eb350bb67ae46..9677111f9ab24b67f3063d40d08b12b7c24ee8e2 100644 (file)
@@ -180,11 +180,7 @@ static int adv_pci1724_auto_attach(struct comedi_device *dev,
        s->insn_write   = adv_pci1724_insn_write;
        s->private      = (void *)PCI1724_DAC_CTRL_MODE_GAIN;
 
-       ret = comedi_alloc_subdev_readback(s);
-       if (ret)
-               return ret;
-
-       return 0;
+       return comedi_alloc_subdev_readback(s);
 }
 
 static struct comedi_driver adv_pci1724_driver = {