drm/sun4i: hdmi: Disable clks in bind function error path and unbind function
authorChen-Yu Tsai <wens@csie.org>
Fri, 29 Sep 2017 08:22:57 +0000 (16:22 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 2 Oct 2017 19:58:47 +0000 (21:58 +0200)
commitcb1dab0e01969d63717c7464cb5d75c77a39bf02
tree202fd7389abacace4a38efeacc54e8843b022158
parent9e66317d3c92ddaab330c125dfe9d06eee268aff
drm/sun4i: hdmi: Disable clks in bind function error path and unbind function

The HDMI driver enables the bus and mod clocks in the bind function, but
does not disable them if it then bails our due to any errors. Neither
does it disable the clocks in the unbind function.

Fix this by adding a proper error path to the bind function, and
clk_disable_unprepare calls to the unbind function.

Also rename the err_cleanup_connector label to err_cleanup_encoder,
since it is the encoder that gets cleaned up.

Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170929082306.16193-6-wens@csie.org
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c