From 9aed06693df75c0e81ae2a25c3ed51dbb4d4ac61 Mon Sep 17 00:00:00 2001 From: Cristina Moraru Date: Tue, 20 Oct 2015 13:16:33 +0300 Subject: [PATCH] staging: comedi: Fix return flow Simplify function return flow. Issue found with coccinelle. Signed-off-by: Cristina Moraru Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/daqboard2000.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c index 611b0a3ef5d7..57ab6680e3ae 100644 --- a/drivers/staging/comedi/drivers/daqboard2000.c +++ b/drivers/staging/comedi/drivers/daqboard2000.c @@ -713,12 +713,8 @@ 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) -- 2.39.5