]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
spi: spi-fsl-dspi: Remove usage of devm_kzalloc
authorBhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Tue, 27 Jan 2015 10:57:20 +0000 (16:27 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 27 Jan 2015 19:52:02 +0000 (19:52 +0000)
commit973fbce69ed8e79b5fe3ad19cfecb581a7ef8048
treebe3d6b0e06947571d65441c03ba20b56f6ab4e80
parent97bf6af1f928216fd6c5a66e8a57bfa95a659672
spi: spi-fsl-dspi: Remove usage of devm_kzalloc

devm_* API was supposed to be used only in probe function call.
Memory is allocated at 'probe' and free automatically at 'remove'.
Usage of devm_* functions outside probe sometimes leads to memory leak.
Avoid using devm_kzalloc in dspi_setup_transfer and use kzalloc instead.
Also add the dspi_cleanup function to free the controller data upon
cleanup.

Acked-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
drivers/spi/spi-fsl-dspi.c