mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
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>
This commit is contained in:
parent
ea0db9b2fd
commit
fe43ec5350
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user