From e1f9ae3bcaf270fb306702e4182d9beccf7fb001 Mon Sep 17 00:00:00 2001 From: Abhishek Sharma Date: Mon, 1 Jun 2015 06:06:53 +0000 Subject: [PATCH] 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 --- drivers/staging/comedi/drivers/adv_pci1724.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 = { -- 2.30.2