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

[Xen-changelog] [linux-2.6.18-xen] gntdev: remove bogus and broken try_module_get()



# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1326975813 -3600
# Node ID 730ae04c66c27ae888746cb9be1d93fa14399496
# Parent  c3d7beacd036903e397da7cbbabbebcd59f56650
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>
---


diff -r c3d7beacd036 -r 730ae04c66c2 drivers/xen/gntdev/gntdev.c
--- a/drivers/xen/gntdev/gntdev.c       Mon Jan 09 10:54:20 2012 +0100
+++ b/drivers/xen/gntdev/gntdev.c       Thu Jan 19 13:23:33 2012 +0100
@@ -427,8 +427,6 @@
 {
        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 @@
                        kfree(private_data->free_list);
                kfree(private_data);
        }
-       module_put(THIS_MODULE);
        return 0;
 }
 

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


 


Rackspace

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