ARM: imx: fix error handling in ipu device registration
authorEmil Goode <emilgoode@gmail.com>
Mon, 19 May 2014 07:07:54 +0000 (15:07 +0800)
committerOlof Johansson <olof@lixom.net>
Thu, 22 May 2014 05:16:56 +0000 (22:16 -0700)
commitd1d70e5dc2cfa9047bb935c41ba808ebb8135696
tree2d4f25fbf928ebc38aa859391eec1cc4c4e8d0de
parent3bc4a87c03e75c88471450380cb194bf30ea4a87
ARM: imx: fix error handling in ipu device registration

If we fail to allocate struct platform_device pdev we
dereference it after the goto label err.

This bug was found using coccinelle.

Fixes: afa77ef (ARM: mx3: dynamically allocate "ipu-core" devices)
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
arch/arm/mach-imx/devices/platform-ipu-core.c