From patchwork Thu May 2 21:10:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [RFT] 3c59x: fix freeing nonexistent resource on driver unload X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 241101 X-Patchwork-Delegate: davem@davemloft.net Message-Id: <201305030110.22462.sergei.shtylyov@cogentembedded.com> To: netdev@vger.kernel.org, klassert@mathematik.tu-chemnitz.de, tedheadster@gmail.com Date: Fri, 3 May 2013 01:10:22 +0400 From: Sergei Shtylyov List-Id: 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: Matthew Whitehead Signed-off-by: Sergei Shtylyov --- The patch is against David Miller's 'net-next.git' repo. Matthew, please test it and report on the list. drivers/net/ethernet/3com/3c59x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: net-next/drivers/net/ethernet/3com/3c59x.c =================================================================== --- net-next.orig/drivers/net/ethernet/3com/3c59x.c +++ net-next/drivers/net/ethernet/3com/3c59x.c @@ -951,7 +951,7 @@ static int vortex_eisa_remove(struct dev unregister_netdev(dev); 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); return 0;