Commit 06cb6b54 authored by Varsha Rao's avatar Varsha Rao Committed by Greg Kroah-Hartman

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: default avatarVarsha Rao <rvarsha016@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cb5de2f8
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment