summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorHeena Sirwani2014-10-06 10:16:09 +0200
committerGreg Kroah-Hartman2014-10-20 04:29:13 +0200
commitfe43ec5350d34244dedf3e6647f991f7c348c82d (patch)
tree15e5f7dc479569dcf78c178fd0fb12b6d979b121 /drivers/staging/comedi/comedi_fops.c
parentStaging: comedi: drivers: Compressed two lines of code into one. (diff)
downloadkernel-qcow2-linux-fe43ec5350d34244dedf3e6647f991f7c348c82d.tar.gz
kernel-qcow2-linux-fe43ec5350d34244dedf3e6647f991f7c348c82d.tar.xz
kernel-qcow2-linux-fe43ec5350d34244dedf3e6647f991f7c348c82d.zip
Staging: comedi: Compressed two lines of code into one.
The following patch compressed two lines of code into one using coccinelle and removed an unused variable. The semantic patch used is as follows: @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; Signed-off-by: Heena Sirwani <heenasirwani@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_fops.c')
-rw-r--r--drivers/staging/comedi/comedi_fops.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 495969f46e76..224af2b2a685 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -1718,7 +1718,6 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg,
void *file)
{
struct comedi_subdevice *s;
- int ret;
if (arg >= dev->n_subdevices)
return -EINVAL;
@@ -1732,9 +1731,7 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg,
if (s->busy != file)
return -EBUSY;
- ret = do_cancel(dev, s);
-
- return ret;
+ return do_cancel(dev, s);
}
/*