|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] linux/usbback: fix usbstub_exit() placement
Hi,
Jan Beulich wrote:
> The function is being referenced from (non-__exit) usbback_init().
No, usbstub_exit() is only referenced from usbback_exit() in the
latest version.
Are you suggesting that usbstub_exit() should be referenced from
usbback_init() and should do as follows?
Signed-off-by: Noboru Iwamatsu <n_iwamatsu@xxxxxxxxxxxxxx>
diff -r ba13757d92ce drivers/xen/usbback/usbback.c
--- a/drivers/xen/usbback/usbback.c Thu Oct 08 15:37:22 2009 +0900
+++ b/drivers/xen/usbback/usbback.c Fri Oct 16 09:35:28 2009 +0900
@@ -1123,12 +1123,13 @@
return 0;
- out_of_memory:
- kfree(pending_reqs);
- kfree(pending_grant_handles);
- free_empty_pages_and_pagevec(pending_pages, mmap_pages);
- printk("%s: out of memory\n", __FUNCTION__);
- return -ENOMEM;
+out_of_memory:
+ usbstub_exit();
+ kfree(pending_reqs);
+ kfree(pending_grant_handles);
+ free_empty_pages_and_pagevec(pending_pages, mmap_pages);
+ printk("%s: out of memory\n", __FUNCTION__);
+ return -ENOMEM;
}
static void __exit usbback_exit(void)
diff -r ba13757d92ce drivers/xen/usbback/usbstub.c
--- a/drivers/xen/usbback/usbstub.c Thu Oct 08 15:37:22 2009 +0900
+++ b/drivers/xen/usbback/usbstub.c Fri Oct 16 09:35:28 2009 +0900
@@ -317,7 +317,7 @@
return err;
}
-void __exit usbstub_exit(void)
+void usbstub_exit(void)
{
driver_remove_file(&usbback_usb_driver.driver,
&driver_attr_port_ids);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|