spi: fsl-lib: Fix memory leak of pinfo
authorAxel Lin <axel.lin@ingics.com>
Thu, 20 Mar 2014 09:20:17 +0000 (17:20 +0800)
committerMark Brown <broonie@linaro.org>
Fri, 21 Mar 2014 18:12:03 +0000 (18:12 +0000)
of_mpc8xxx_spi_probe() allocates memory for pinfo but the memory is not freed
anywhere. of_mpc8xxx_spi_probe() is called in .probe() and pinfo should be
freed in .remove(), so convert kzalloc to devm_kzalloc to fix the memory leak.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>

No differences found