staging: drm/imx: fix double free bug in error path

kfree(imx_drm_encoder) is already being called at the label
'err_register'.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Lothar Waßmann 2012-12-25 15:58:39 +01:00 committed by Greg Kroah-Hartman
parent 9a8f3f4490
commit efe57d5977

View File

@ -584,7 +584,6 @@ int imx_drm_add_encoder(struct drm_encoder *encoder,
ret = imx_drm_encoder_register(imx_drm_encoder);
if (ret) {
kfree(imx_drm_encoder);
ret = -ENOMEM;
goto err_register;
}