projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93e1c8a
)
usb: u132-hcd: fix resource leak
author
Mukesh Ojha
<mojha@codeaurora.org>
Tue, 26 Mar 2019 08:12:22 +0000
(13:42 +0530)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 27 Mar 2019 15:08:49 +0000
(
00:08
+0900)
if platform_driver_register fails, cleanup the allocated resource
gracefully.
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/u132-hcd.c
patch
|
blob
|
history
diff --git
a/drivers/usb/host/u132-hcd.c
b/drivers/usb/host/u132-hcd.c
index
934584f
..
6343fba
100644
(file)
--- a/
drivers/usb/host/u132-hcd.c
+++ b/
drivers/usb/host/u132-hcd.c
@@
-3204,6
+3204,9
@@
static int __init u132_hcd_init(void)
printk(KERN_INFO "driver %s\n", hcd_name);
workqueue = create_singlethread_workqueue("u132");
retval = platform_driver_register(&u132_platform_driver);
+ if (retval)
+ destroy_workqueue(workqueue);
+
return retval;
}