Commit fe43ec53 authored by Heena Sirwani's avatar Heena Sirwani Committed by Greg Kroah-Hartman

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: default avatarHeena Sirwani <heenasirwani@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ea0db9b2
...@@ -1718,7 +1718,6 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg, ...@@ -1718,7 +1718,6 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg,
void *file) void *file)
{ {
struct comedi_subdevice *s; struct comedi_subdevice *s;
int ret;
if (arg >= dev->n_subdevices) if (arg >= dev->n_subdevices)
return -EINVAL; return -EINVAL;
...@@ -1732,9 +1731,7 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg, ...@@ -1732,9 +1731,7 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg,
if (s->busy != file) if (s->busy != file)
return -EBUSY; return -EBUSY;
ret = do_cancel(dev, s); return do_cancel(dev, s);
return ret;
} }
/* /*
......
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