]> git.baikalelectronics.ru Git - kernel.git/commit
imx-drm: imx-drm-core: make imx_drm_crtc_register() safer
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 16 Dec 2013 12:39:11 +0000 (12:39 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Dec 2013 01:12:55 +0000 (17:12 -0800)
commit1991b814ffc13257f5abfa278899a9476caf1cf0
tree74ae9aacecfad384f402514fc9c952c67cb7192e
parent943041e518a0773f88c86370591035706d49e3e8
imx-drm: imx-drm-core: make imx_drm_crtc_register() safer

imx_drm_crtc_register() doesn't clean up the CRTC upon failure, which
leaves the CRTC attached to the DRM device.  Also, it does setup after
attaching the CRTC to the DRM device.

Fix this by reordering the function such that we do the setup before
drm_crtc_init(): this fixes both issues.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/imx-drm/imx-drm-core.c