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: NStefan Agner <stefan@agner.ch> Signed-off-by: NBhuvanchandra DV <bhuvanchandra.dv@toradex.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
Showing
想要评论请 注册 或 登录