b43legacy: fix DMA slot resource leakage
authorStefano Brivio <stefano.brivio@polimi.it>
Sat, 2 Feb 2008 18:16:03 +0000 (19:16 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 5 Feb 2008 19:35:46 +0000 (14:35 -0500)
commit8dd0100ce9511e52614ecd0a6587c13ce5769c8b
tree0c3e89e2b154f2f778d6a0ae84006817ef275ebb
parent9eca9a8e81928685b4de00ecef83a7c13c340fc9
b43legacy: fix DMA slot resource leakage

This fixes four resource leakages.
In any error path we must deallocate the DMA frame slots we
previously allocated by request_slot().
This is done by storing the ring pointers before doing any ring
allocation and restoring the old pointers in case of an error.

This patch by Michael Buesch has been ported to b43legacy.

Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/b43legacy/dma.c