From: Abdul Hussain Date: Mon, 22 Jun 2015 06:11:13 +0000 (+0000) Subject: Staging: comedi: s626: Simplify a trivial if-return sequence X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=71b9f42eac9722d8dc39a5b2771255e2a6214eee;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Staging: comedi: s626: 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/s626.c b/drivers/staging/comedi/drivers/s626.c index 781918d8d85f..35f0f676eb28 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -2852,11 +2852,7 @@ static int s626_auto_attach(struct comedi_device *dev, s->insn_read = s626_enc_insn_read; s->insn_write = s626_enc_insn_write; - ret = s626_initialize(dev); - if (ret) - return ret; - - return 0; + return s626_initialize(dev); } static void s626_detach(struct comedi_device *dev)