lkml.org 
[lkml]   [2012]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] gpu: drm/nouveau/core/engine/disp/dacnv50.c: fix var uninit issue
Date
the variable "ret" might be uninitialized in the "default" branch of "switch"

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
index d0817d9..ae19dec 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
@@ -64,7 +64,7 @@ nv50_dac_mthd(struct nouveau_object *object, u32 mthd, void *args, u32 size)
struct nv50_disp_priv *priv = (void *)object->engine;
const u8 or = (mthd & NV50_DISP_DAC_MTHD_OR);
u32 *data = args;
- int ret;
+ int ret = 0;

if (size < sizeof(u32))
return -EINVAL;
--
1.7.4.5


\
 
 \ /
  Last update: 2012-12-06 19:02    [W:0.026 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site