summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dss.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-18 10:47:02 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-22 09:59:14 +0200
commitc6eee968d40d319f0ac7a8a63dcbc633d9e6a2ea (patch)
tree69c37f169f25f8fad858b032508d2a1c2cd5c8ea /drivers/video/omap2/dss/dss.c
parentOMAPDSS: DISPC: fix usage of dispc_ovl_set_accu_uv (diff)
downloadlinux-c6eee968d40d319f0ac7a8a63dcbc633d9e6a2ea.tar.xz
linux-c6eee968d40d319f0ac7a8a63dcbc633d9e6a2ea.zip
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 2183f840a7ac..6ea1ff149f6f 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;