Skip to contentSkip to conversation

gpu: drm/nouveau/core/engine/disp/dacnv50.c: fix var uninit issue

PATCH New Cong Ding 1 participant 1 message Dec 6, 2012

Subsystems (3)
lore
Share & tools
lore

Cong Ding

author
#0 lore raw

PATCH 1/1 gpu: drm/nouveau/core/engine/disp/dacnv50.c: fix var uninit issue

the variable "ret" might be uninitialized in the "default" branch of "switch"

---
 drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c +1 -1
index d0817d9..ae19dec 100644
@@ -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;
Signature · 1 line
1.7.4.5