From: Abhishek Sharma Date: Mon, 1 Jun 2015 06:06:53 +0000 (+0000) Subject: Staging: comedi: adv_pci1724: Remove redundant return statements X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e1f9ae3bcaf270fb306702e4182d9beccf7fb001;p=openwrt%2Fstaging%2Fblogic.git Staging: comedi: adv_pci1724: Remove redundant return statements Replace unnecessary conditional checks for variable 'ret' and replace by single return statement. Signed-off-by: Abhishek Sharma Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/adv_pci1724.c b/drivers/staging/comedi/drivers/adv_pci1724.c index f7a7dab013db..9677111f9ab2 100644 --- a/drivers/staging/comedi/drivers/adv_pci1724.c +++ b/drivers/staging/comedi/drivers/adv_pci1724.c @@ -180,11 +180,7 @@ static int adv_pci1724_auto_attach(struct comedi_device *dev, s->insn_write = adv_pci1724_insn_write; s->private = (void *)PCI1724_DAC_CTRL_MODE_GAIN; - ret = comedi_alloc_subdev_readback(s); - if (ret) - return ret; - - return 0; + return comedi_alloc_subdev_readback(s); } static struct comedi_driver adv_pci1724_driver = {