net/mlx4_core: destroy workqueue when driver fails to register
Subsystems (3)
PATCH 1/1 net/mlx4_core: destroy workqueue when driver fails to register
When driver registration fails, we need to clean up the resources allocated before. mlx4_core missed to destroy the workqueue allocated.
This patch destroies the workqueue when registration fails.
--- drivers/net/ethernet/mellanox/mlx4/main.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/ethernet/mellanox/mlx4/main.c +2 -0
@@ -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 ; }
Signature · 1 line
1.7.5.4
Quoted 16 lines · Wei Yang
When driver registration fails, we need to clean up the resources allocated before.
mlx4_coremissed to destroy the workqueue allocated.This patch destroies the workqueue when registration fails.
Signed-off-by Wei Yang <[email protected]>--- drivers/net/ethernet/mellanox/mlx4/main.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/net/ethernet/mellanox/mlx4/main.c +0
-0
drivers/net/ethernet/mellanox/mlx4/main.c static int __init mlx4_init(void) · line 2642
Quoted 8 lines
drivers/net/ethernet/mellanox/mlx4/main.c +2
-0@@ -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 ; }
Quoted 2 lines · Wei Yang
When driver registration fails, we need to clean up the resources allocated before.
mlx4_coremissed to destroy the workqueue allocated.
please use "missed destroying" instead of "missed to destroy"
Quoted 2 lines
This patch destroies the workqueue when registration fails.
please s/destroies/destroys/
Quoted 26 lines
Signed-off-by Wei Yang <[email protected]>--- drivers/net/ethernet/mellanox/mlx4/main.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/net/ethernet/mellanox/mlx4/main.c +2
-1@@ -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 ; } --1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Or Gerlitz
Quoted 2 lines · Wei Yang
When driver registration fails, we need to clean up the resources allocated before.
mlx4_coremissed to destroy the workqueue allocated.please use "missed destroying" instead of "missed to destroy"
Quoted 2 lines
This patch destroies the workqueue when registration fails.
please s/destroies/destroys/
Ah, sorry for my poor English, will send another one.
Quoted 27 lines
Quoted 27 lines
Signed-off-by Wei Yang <[email protected]>--- drivers/net/ethernet/mellanox/mlx4/main.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/net/ethernet/mellanox/mlx4/main.c +2
-1@@ -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 ; } --1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Richard Yang Help you, Help me