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)
committerJiri Slaby <jslaby@suse.cz>
Fri, 20 Jun 2014 15:33:57 +0000 (17:33 +0200)
commit93a5cb6cf809599758d596e16b659f5944ee9652
tree6c4ff2a731265b319cf9f21d9229a83e7ba31690
parent517e5981c10ff3fe845ace3c2d7e664da72eafdf
ARM: imx: fix error handling in ipu device registration

commit d1d70e5dc2cfa9047bb935c41ba808ebb8135696 upstream.

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>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/arm/mach-imx/devices/platform-ipu-core.c