diff options
author | Varsha Rao <rvarsha016@gmail.com> | 2017-03-12 18:07:30 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-14 01:27:31 +0300 |
commit | 06cb6b5434937180251d0ddb3d9a4cb2af6015da (patch) | |
tree | a9282b3b5339060e9eae00353cc6c1894a5c77ec /drivers | |
parent | cb5de2f8aab4a3f43c0f958c332a986c4b3c44cb (diff) | |
download | linux-06cb6b5434937180251d0ddb3d9a4cb2af6015da.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/cb_pcidas64.c | 4 |
1 files changed, 1 insertions, 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 */ |