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

index a6798ad8fa7fa76703135e8818258350b117265c..a562df498b017e278f266f7ff8a07160991a2f61 100644 (file)
@@ -130,11 +130,7 @@ static int dac02_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        s->range_table  = &das02_ao_ranges;
        s->insn_write   = dac02_ao_insn_write;
 
-       ret = comedi_alloc_subdev_readback(s);
-       if (ret)
-               return ret;
-
-       return 0;
+       return comedi_alloc_subdev_readback(s);
 }
 
 static struct comedi_driver dac02_driver = {