omap: fix compiler warning

When compiling with linaro toolchain version 4.6.2 got this warning.

  CC     omap_drm.lo
omap_drm.c: In function 'omap_bo_new_impl':
omap_drm.c:139:6: warning: 'bo' may be used uninitialized in this function [-Wuninitialized]

This patch initialize bo to NULL avoiding the warning.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Rob Clark <rob@ti.com>
main
Víctor Manuel Jáquez Leal 2012-04-02 18:08:29 +02:00 committed by Rob Clark
parent 06eaf09469
commit e98ed38ca9
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ int omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value)
static struct omap_bo * omap_bo_new_impl(struct omap_device *dev,
union omap_gem_size size, uint32_t flags)
{
struct omap_bo *bo;
struct omap_bo *bo = NULL;
struct drm_omap_gem_new req = {
.size = size,
.flags = flags,