[PATCH v2 6/6] Staging: comedi: s626: Simplify a trivial if-return sequence

From: Abdul, Hussain (H.)
Date: Mon Jun 22 2015 - 02:12:19 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/s626.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
index 781918d..35f0f67 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -2852,11 +2852,7 @@ static int s626_auto_attach(struct comedi_device *dev,
s->insn_read = s626_enc_insn_read;
s->insn_write = s626_enc_insn_write;

- ret = s626_initialize(dev);
- if (ret)
- return ret;
-
- return 0;
+ return s626_initialize(dev);
}

static void s626_detach(struct comedi_device *dev)
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/