projects
/
platform
/
kernel
/
linux-arm64.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18fc25c
)
net/mlx4_core: destroy workqueue when driver fails to register
author
Wei Yang
<weiyang@linux.vnet.ibm.com>
Tue, 3 Dec 2013 02:04:10 +0000
(10:04 +0800)
committer
David S. Miller
<davem@davemloft.net>
Tue, 3 Dec 2013 16:55:44 +0000
(11:55 -0500)
When driver registration fails, we need to clean up the resources allocated
before. mlx4_core missed destroying the workqueue allocated.
This patch destroys the workqueue when registration fails.
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/main.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/mellanox/mlx4/main.c
b/drivers/net/ethernet/mellanox/mlx4/main.c
index
5789ea2
..
01fc651
100644
(file)
--- a/
drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/
drivers/net/ethernet/mellanox/mlx4/main.c
@@
-2635,6
+2635,8
@@
static int __init mlx4_init(void)
return -ENOMEM;
ret = pci_register_driver(&mlx4_driver);
+ if (ret < 0)
+ destroy_workqueue(mlx4_wq);
return ret < 0 ? ret : 0;
}