qlge: Only free resources if they were allocated
authorBreno Leitao <leitao@linux.vnet.ibm.com>
Mon, 25 Jan 2010 23:46:58 +0000 (15:46 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jan 2010 23:46:58 +0000 (15:46 -0800)
commit4f9a91c81273b66afe0b6a9be460b47581b28246
treea9868d5c1765e7bb13d7b4bf4013a4f8df043052
parentd7c7544c3d5f59033d1bf3236bc7b289f5f26b75
qlge: Only free resources if they were allocated

Currently qlge tries to release regions even if they were not allocated.
This causes messages like the following in the kernel log

Trying to free nonexistent resource <00000000006af400-00000000006af4ff>
Trying to free nonexistent resource <00003c04ff9f4000-00003c04ff9f7fff>
Trying to free nonexistent resource <00003c04ffc00000-00003c04ffcfffff>

This patch fixes the goto logic in order to not release the resources
if they were not allocated.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlge/qlge_main.c