diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2020-04-26 22:59:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-20 08:15:33 +0200 |
commit | f0d331d1ababe75cdd3690fe1c99f6cc6aded099 (patch) | |
tree | 904ebe7b159bf2637321b173d32bce978ea5174b /drivers/net | |
parent | bf3c068c5c074ef417633c350e48109fe2578dfa (diff) | |
download | linux-stable-f0d331d1ababe75cdd3690fe1c99f6cc6aded099.tar.gz linux-stable-f0d331d1ababe75cdd3690fe1c99f6cc6aded099.tar.bz2 linux-stable-f0d331d1ababe75cdd3690fe1c99f6cc6aded099.zip |
net: moxa: Fix a potential double 'free_irq()'
[ Upstream commit ee8d2267f0e39a1bfd95532da3a6405004114b27 ]
Should an irq requested with 'devm_request_irq' be released explicitly,
it should be done by 'devm_free_irq()', not 'free_irq()'.
Fixes: 6c821bd9edc9 ("net: Add MOXA ART SoCs ethernet driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/moxa/moxart_ether.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c index 0622fd03941b..6fe61d9343cb 100644 --- a/drivers/net/ethernet/moxa/moxart_ether.c +++ b/drivers/net/ethernet/moxa/moxart_ether.c @@ -571,7 +571,7 @@ static int moxart_remove(struct platform_device *pdev) struct net_device *ndev = platform_get_drvdata(pdev); unregister_netdev(ndev); - free_irq(ndev->irq, ndev); + devm_free_irq(&pdev->dev, ndev->irq, ndev); moxart_mac_free_memory(ndev); free_netdev(ndev); |