Commit efefe3bd authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Greg Kroah-Hartman

3c59x: fix freeing nonexistent resource on driver unload

[ Upstream commit c81400be ]

When unloading the driver that drives an EISA board, a message similar to the
following one is displayed:

Trying to free nonexistent resource <0000000000013000-000000000001301f>

Then an user is unable to reload the driver because the resource it requested in
the previous load hasn't been freed. This happens most probably due to a typo in
vortex_eisa_remove() which calls release_region() with 'dev->base_addr'  instead
of 'edev->base_addr'...
Reported-by: default avatarMatthew Whitehead <tedheadster@gmail.com>
Tested-by: default avatarMatthew Whitehead <tedheadster@gmail.com>
Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 58484f8c
...@@ -951,7 +951,7 @@ static int vortex_eisa_remove(struct device *device) ...@@ -951,7 +951,7 @@ static int vortex_eisa_remove(struct device *device)
unregister_netdev(dev); unregister_netdev(dev);
iowrite16(TotalReset|0x14, ioaddr + EL3_CMD); iowrite16(TotalReset|0x14, ioaddr + EL3_CMD);
release_region(dev->base_addr, VORTEX_TOTAL_SIZE); release_region(edev->base_addr, VORTEX_TOTAL_SIZE);
free_netdev(dev); free_netdev(dev);
return 0; return 0;
......
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