summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/video/tegra/dc/hdmi.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c
index 0f98cd75acaa..fa879a51ba3b 100644
--- a/drivers/video/tegra/dc/hdmi.c
+++ b/drivers/video/tegra/dc/hdmi.c
@@ -474,7 +474,12 @@ static inline void tegra_hdmi_hotplug_enable(struct tegra_dc_hdmi_data *hdmi)
void tegra_hdmi_enable_clk(void)
{
struct tegra_dc_hdmi_data *hdmi = dc_hdmi;
- struct tegra_dc *dc = hdmi->dc;
+ struct tegra_dc *dc;
+
+ if (!hdmi)
+ return;
+
+ dc = hdmi->dc;
mutex_lock(&dc->lock);
clk_prepare_enable(hdmi->disp1_clk);
@@ -488,7 +493,12 @@ EXPORT_SYMBOL(tegra_hdmi_enable_clk);
void tegra_hdmi_disable_clk(void)
{
struct tegra_dc_hdmi_data *hdmi = dc_hdmi;
- struct tegra_dc *dc = hdmi->dc;
+ struct tegra_dc *dc;
+
+ if (!hdmi)
+ return;
+
+ dc = hdmi->dc;
atomic_set(&tf_hdmi_enable, 0);
mutex_lock(&dc->lock);