]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/staging/comedi/comedi_fops.c: add missing vfree
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 22 Apr 2012 11:37:09 +0000 (13:37 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 30 May 2012 23:43:31 +0000 (00:43 +0100)
commit abae41e6438b798e046d721b6ccdd55b4a398170 upstream.

aux_free is freed on all other exits from the function.  By removing the
return, we can benefit from the vfree already at the end of the function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/staging/comedi/comedi_fops.c

index 5e78c77d5a08277611c183c92dae273362caed58..4ad2c0efc5c414b52fa9308c04825cbb8319c61c 100644 (file)
@@ -280,7 +280,7 @@ static int do_devconfig_ioctl(struct comedi_device *dev,
        if (ret == 0) {
                if (!try_module_get(dev->driver->module)) {
                        comedi_device_detach(dev);
-                       return -ENOSYS;
+                       ret = -ENOSYS;
                }
        }