[PATCH 3/6] Staging: comedi: daqboard2000: Simplify a trivial if-return sequence
From: Abdul, Hussain (H.)
Date: Fri Jun 19 2015 - 02:00:39 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/daqboard2000.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 611b0a3..58d8d5f 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -713,12 +713,7 @@ 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)
--
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/