avr32: clean up memory allocation in at32_add_device_mci
authorHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Mon, 28 Dec 2009 11:22:06 +0000 (12:22 +0100)
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Mon, 28 Dec 2009 11:33:00 +0000 (12:33 +0100)
This patch will check if the kzalloc for the MCI DMA struct actually
returns a valid address, and also clean up properly if it fails or the
function fails at a later stage.

This also silences a compiler warning about using the slave variable
uninitialized.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>

No differences found