mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 14:14:37 +00:00
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 <rvarsha016@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cb5de2f8aa
commit
06cb6b5434
1 changed files with 1 additions and 3 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue