[PATCH] ARM: imx: add missing kfree call in error paths

Dan Carpenter dan.carpenter at oracle.com
Thu May 22 06:50:16 PDT 2014

On Thu, May 22, 2014 at 03:14:42PM +0200, Emil Goode wrote:
> We forgot to free pdev->dev.dma_mask as it is not freed
> by platform_device_put().

Every function which calls imx31_alloc_mx3_camera() is buggy.  That
means that, at best, it is a 2 on Rusty's API rating.

The correct fix is to introduce an imx31_free_mx3_camera() otherwise we
will just keep introducing these bugs.

dan carpenter

More information about the linux-arm-kernel mailing list