diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-05-18 04:47:02 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-05-22 03:59:14 -0400 |
commit | c6eee968d40d319f0ac7a8a63dcbc633d9e6a2ea (patch) | |
tree | 69c37f169f25f8fad858b032508d2a1c2cd5c8ea /drivers/video/omap2/dss/display.c | |
parent | 36377357db00f8660039578ba57a2a19bfc9ad3d (diff) |
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/display.c')
-rw-r--r-- | drivers/video/omap2/dss/display.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c index faf7d91c4a84..249010630370 100644 --- a/drivers/video/omap2/dss/display.c +++ b/drivers/video/omap2/dss/display.c | |||
@@ -304,6 +304,7 @@ int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev) | |||
304 | return 24; | 304 | return 24; |
305 | default: | 305 | default: |
306 | BUG(); | 306 | BUG(); |
307 | return 0; | ||
307 | } | 308 | } |
308 | } | 309 | } |
309 | EXPORT_SYMBOL(omapdss_default_get_recommended_bpp); | 310 | EXPORT_SYMBOL(omapdss_default_get_recommended_bpp); |
@@ -347,6 +348,7 @@ bool dss_use_replication(struct omap_dss_device *dssdev, | |||
347 | break; | 348 | break; |
348 | default: | 349 | default: |
349 | BUG(); | 350 | BUG(); |
351 | return false; | ||
350 | } | 352 | } |
351 | 353 | ||
352 | return bpp > 16; | 354 | return bpp > 16; |