diff mbox

OMAP: DSS: ensure clocks are disabled on failed init

Message ID 1272309166-698-1-git-send-email-khilman@deeprootsystems.com (mailing list archive)
State Accepted
Delegated to: Kevin Hilman
Headers show

Commit Message

Kevin Hilman April 26, 2010, 7:12 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index 7ebe50b..62f7ee2 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -584,6 +584,7 @@  static int omap_dss_probe(struct platform_device *pdev)
 
 	/* XXX fail correctly */
 fail0:
+	dss_clk_disable_all();
 	return r;
 }
 
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index e777e35..4cc54ef 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -195,6 +195,9 @@  void dispc_save_context(void)
 	if (cpu_is_omap24xx())
 		return;
 
+	if (!dispc.base)
+		return;
+
 	SR(SYSCONFIG);
 	SR(IRQENABLE);
 	SR(CONTROL);