diff options
author | Michael Schmitz <schmitzmic@gmail.com> | 2018-04-19 14:05:25 +1200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-19 16:11:11 -0400 |
commit | 453da988785fab2658b88ab57b992cacc9dd3b7d (patch) | |
tree | 0c19bcbd97f4304c2c1a8f59b461ef2d10d93941 /drivers/net/ethernet/8390/ax88796.c | |
parent | caaf45a6ba064103fabc2cad46bb5caeec41859f (diff) | |
download | op-kernel-dev-453da988785fab2658b88ab57b992cacc9dd3b7d.zip op-kernel-dev-453da988785fab2658b88ab57b992cacc9dd3b7d.tar.gz |
net-next: ax88796: release platform device drvdata on probe error and module remove
The net device struct pointer is stored as platform device drvdata on
module probe - clear the drvdata entry on probe fail there, as well as
when unloading the module.
Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/8390/ax88796.c')
-rw-r--r-- | drivers/net/ethernet/8390/ax88796.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c index 229279f..2a0ddec 100644 --- a/drivers/net/ethernet/8390/ax88796.c +++ b/drivers/net/ethernet/8390/ax88796.c @@ -826,6 +826,7 @@ static int ax_remove(struct platform_device *pdev) release_mem_region(mem->start, resource_size(mem)); } + platform_set_drvdata(pdev, NULL); free_netdev(dev); return 0; @@ -959,6 +960,7 @@ static int ax_probe(struct platform_device *pdev) release_mem_region(mem->start, mem_size); exit_mem: + platform_set_drvdata(pdev, NULL); free_netdev(dev); return ret; |