From 06cb6b5434937180251d0ddb3d9a4cb2af6015da Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Sun, 12 Mar 2017 20:37:30 +0530 Subject: [PATCH] staging: comedi: Compress return logic into one line. Simplify function return by merging assignment and return into a single line. The following coccinelle script is used to fix this issue. @@ expression e; local idexpression ret; @@ -ret = e; -return ret; +return e; Signed-off-by: Varsha Rao Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidas64.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index 3b98193de0a4..b761f000c1dc 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -1417,9 +1417,7 @@ static int set_ai_fifo_size(struct comedi_device *dev, unsigned int num_samples) if (retval < 0) return retval; - num_samples = retval * fifo->num_segments * fifo->sample_packing_ratio; - - return num_samples; + return retval * fifo->num_segments * fifo->sample_packing_ratio; } /* query length of fifo */ -- 2.20.1