This driver forgets to free allocated netdev in remove like
what is done in probe failure.
Add the free to fix it.
Signed-off-by: Chuhong Yuan <[email protected]>
---
drivers/net/ethernet/cortina/gemini.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c
index e736ce2c58ca..a8f4c69252ff 100644
--- a/drivers/net/ethernet/cortina/gemini.c
+++ b/drivers/net/ethernet/cortina/gemini.c
@@ -2524,6 +2524,7 @@ static int gemini_ethernet_port_remove(struct platform_device *pdev)
struct gemini_ethernet_port *port = platform_get_drvdata(pdev);
gemini_port_remove(port);
+ free_netdev(port->netdev);
return 0;
}
--
2.24.0
On Fri, Nov 15, 2019 at 7:25 AM Chuhong Yuan <[email protected]> wrote:
> This driver forgets to free allocated netdev in remove like
> what is done in probe failure.
> Add the free to fix it.
>
> Signed-off-by: Chuhong Yuan <[email protected]>
Looks correct!
Reviewed-by: Linus Walleij <[email protected]>
Yours,
Linus Walleij
From: Chuhong Yuan <[email protected]>
Date: Fri, 15 Nov 2019 14:24:54 +0800
> This driver forgets to free allocated netdev in remove like
> what is done in probe failure.
> Add the free to fix it.
>
> Signed-off-by: Chuhong Yuan <[email protected]>
Applied and queued up for -stable, thank you.