[PATCH 4/6] Staging: comedi: dac02: Simplify a trivial if-return sequence
From: Abdul, Hussain (H.)
Date: Tue Jun 16 2015 - 10:04:44 EST
From: Abdul Hussain <habdul@xxxxxxxxxxx>
This patch simplify a trivial if-return sequence. Possibly combine with
a preceding function call.
Signed-off-by: Abdul Hussain <habdul@xxxxxxxxxxx>
---
drivers/staging/comedi/drivers/dac02.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dac02.c b/drivers/staging/comedi/drivers/dac02.c
index a6798ad..a562df4 100644
--- a/drivers/staging/comedi/drivers/dac02.c
+++ b/drivers/staging/comedi/drivers/dac02.c
@@ -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 = {
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/