spi/bfin_spi: fix resources leakage
authorDaniel Mack <daniel@caiaq.de>
Wed, 25 Mar 2009 00:18:35 +0000 (00:18 +0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 18 Oct 2010 06:49:28 +0000 (02:49 -0400)
commitac01e97d644da8e947ffa1bde5083290fe2e36e7
treec2a97d4c239afb65376dbaa81aca7610b0883369
parent2b666ca4a68cbc22483b0f2e1ba3c0e59b01ae9e
spi/bfin_spi: fix resources leakage

Re-order setup() a bit so we don't leak memory/dma/gpio resources upon
errors.  Also make sure we don't call kfree() twice on the same object.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
drivers/spi/spi_bfin5xx.c