staging: et131x: fix allocation failures
authorAlan <gnomes@lxorguk.ukuu.org.uk>
Mon, 17 Feb 2014 14:13:08 +0000 (14:13 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Feb 2014 20:15:19 +0000 (12:15 -0800)
commita9f488831cb4e95d0c6464e2c68cf87cd75dfd87
tree7a2c156eba60cf1e9aa2ec0fa31ba03bbbb9f887
parent53693d9068735ccb4a2c304f60c88e168895029d
staging: et131x: fix allocation failures

We should check the ring allocations don't fail.
If we get a fail we need to clean up properly. The allocator assumes the
deallocator will be used on failure, but it isn't. Make sure the
right deallocator is always called and add a missing check against
fbr allocation failure.

[v2]: Correct check logic

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/et131x/et131x.c