summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dss.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-18 11:47:02 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-22 10:59:14 +0300
commitc6eee968d40d319f0ac7a8a63dcbc633d9e6a2ea (patch)
tree69c37f169f25f8fad858b032508d2a1c2cd5c8ea /drivers/video/omap2/dss/dss.c
parent36377357db00f8660039578ba57a2a19bfc9ad3d (diff)
downloadop-kernel-dev-c6eee968d40d319f0ac7a8a63dcbc633d9e6a2ea.zip
op-kernel-dev-c6eee968d40d319f0ac7a8a63dcbc633d9e6a2ea.tar.gz
OMAPDSS: remove compiler warnings when CONFIG_BUG=n
If CONFIG_BUG is not enabled, BUG() does not stop the execution. Many places in code expect the execution to stop, and this causes compiler warnings about uninitialized variables and returning from a non-void function without a return value. This patch fixes the warnings by initializing the variables and returning properly after BUG() lines. However, the behaviour is still undefined after the BUG, but this is the choice the user makes when using CONFIG_BUG=n. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dss.c')
-rw-r--r--drivers/video/omap2/dss/dss.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 2183f84..6ea1ff1 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -325,6 +325,7 @@ void dss_select_dispc_clk_source(enum omap_dss_clk_source clk_src)
break;
default:
BUG();
+ return;
}
dss_feat_get_reg_field(FEAT_REG_DISPC_CLK_SWITCH, &start, &end);
@@ -358,6 +359,7 @@ void dss_select_dsi_clk_source(int dsi_module,
break;
default:
BUG();
+ return;
}
pos = dsi_module == 0 ? 1 : 10;
@@ -393,6 +395,7 @@ void dss_select_lcd_clk_source(enum omap_channel channel,
break;
default:
BUG();
+ return;
}
pos = channel == OMAP_DSS_CHANNEL_LCD ? 0 : 12;
OpenPOWER on IntegriCloud