From: Abdul Hussain Date: Mon, 22 Jun 2015 06:11:06 +0000 (+0000) Subject: Staging: comedi: dac02: Simplify a trivial if-return sequence X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~11760^2~700 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=2b2dae3da36dd2bcbf6c2171dba8a51a7b42673a;p=mirror_ubuntu-focal-kernel.git Staging: comedi: dac02: 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/dac02.c b/drivers/staging/comedi/drivers/dac02.c index a6798ad8fa7f..a562df498b01 100644 --- a/drivers/staging/comedi/drivers/dac02.c +++ b/drivers/staging/comedi/drivers/dac02.c @@ -130,11 +130,7 @@ static int dac02_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->range_table = &das02_ao_ranges; s->insn_write = dac02_ao_insn_write; - ret = comedi_alloc_subdev_readback(s); - if (ret) - return ret; - - return 0; + return comedi_alloc_subdev_readback(s); } static struct comedi_driver dac02_driver = {