]> git.baikalelectronics.ru Git - kernel.git/commit
drm: sun4i: do cleanup if RGB output init fails
authorChen-Yu Tsai <wens@csie.org>
Tue, 17 May 2016 15:56:06 +0000 (23:56 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 30 May 2016 06:28:33 +0000 (08:28 +0200)
commitd7ab989f2f9229be390b6b446888739f730cb1b0
treea2548963041b9da7b3da20de8c4b6c88c38437f2
parent094d7446a6eb0386535f2d9ee23c0f8dad6f356e
drm: sun4i: do cleanup if RGB output init fails

sun4i_rgb_init() can fail, which results in TCON failing to bind.
In this case we need to do cleanup, specificly unregistering the
dotclock, which is regmap based, and the regmap is registered as
part of the sun4i_tcon_bind().

Failing to do so results in a NULL pointer reference when the CCF
tries to turn off unused clocks.

Fixes: 60e2d7d48333 ("drm: sun4i: Add RGB output")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/gpu/drm/sun4i/sun4i_tcon.c