From: Abdul Hussain Date: Mon, 22 Jun 2015 06:11:09 +0000 (+0000) Subject: Staging: comedi: ni_daq_dio24: Simplify a trivial if-return sequence X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ac7e62914cf5d31d31948d3f2b085e80e515a7cc;p=linux-beck.git Staging: comedi: ni_daq_dio24: Simplify a trivial if-return sequence This patch simplify a trivial if-return sequence. Possibly combine with a preceding function call. Signed-off-by: Abdul Hussain Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index a208cb348437..d9de83ab0267 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c @@ -55,11 +55,7 @@ static int dio24_auto_attach(struct comedi_device *dev, /* 8255 dio */ s = &dev->subdevices[0]; - ret = subdev_8255_init(dev, s, NULL, 0x00); - if (ret) - return ret; - - return 0; + return subdev_8255_init(dev, s, NULL, 0x00); } static struct comedi_driver driver_dio24 = {