Commit ee8d2267 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by David S. Miller

net: moxa: Fix a potential double 'free_irq()'

Should an irq requested with 'devm_request_irq' be released explicitly,
it should be done by 'devm_free_irq()', not 'free_irq()'.

Fixes: 6c821bd9 ("net: Add MOXA ART SoCs ethernet driver")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ab046a5d
...@@ -564,7 +564,7 @@ static int moxart_remove(struct platform_device *pdev) ...@@ -564,7 +564,7 @@ static int moxart_remove(struct platform_device *pdev)
struct net_device *ndev = platform_get_drvdata(pdev); struct net_device *ndev = platform_get_drvdata(pdev);
unregister_netdev(ndev); unregister_netdev(ndev);
free_irq(ndev->irq, ndev); devm_free_irq(&pdev->dev, ndev->irq, ndev);
moxart_mac_free_memory(ndev); moxart_mac_free_memory(ndev);
free_netdev(ndev); free_netdev(ndev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment