[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] linux-2.6.18/gntdev: remove bogus and broken try_module_get()



Its return value wasn't checked, it wasn't undone in the error path,
and it was redundnant (the caller being responsible for doing this).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/drivers/xen/gntdev/gntdev.c
+++ b/drivers/xen/gntdev/gntdev.c
@@ -427,8 +427,6 @@ static int gntdev_open(struct inode *ino
 {
        gntdev_file_private_data_t *private_data;
 
-       try_module_get(THIS_MODULE);
-
        /* Allocate space for the per-instance private data. */
        private_data = kmalloc(sizeof(*private_data), GFP_KERNEL);
        if (!private_data)
@@ -467,7 +465,6 @@ static int gntdev_release(struct inode *
                        kfree(private_data->free_list);
                kfree(private_data);
        }
-       module_put(THIS_MODULE);
        return 0;
 }
 




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.