[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20160401110330.GB6048@mwanda>
Date: Fri, 1 Apr 2016 14:03:30 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: David Airlie <airlied@...ux.ie>
Cc: Ben Skeggs <bskeggs@...hat.com>,
Ilia Mirkin <imirkin@...m.mit.edu>,
Pekka Enberg <penberg@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Sudip Mukherjee <sudipm.mukherjee@...il.com>,
Alexandre Courbot <acourbot@...dia.com>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [patch] drm/nouveau/gem: silence uninitialized variable warning
The static checker checker is warning that we could hit the first
continue; on every iteration through the loop and never initialize
"ret". It seems unlikely but we may as well silence the warning.
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index a0865c4..fd36b24 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -370,7 +370,8 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
struct nouveau_cli *cli = nouveau_cli(file_priv);
struct drm_device *dev = chan->drm->dev;
int trycnt = 0;
- int ret, i;
+ int ret = -ENOENT;
+ int i;
struct nouveau_bo *res_bo = NULL;
LIST_HEAD(gart_list);
LIST_HEAD(vram_list);
Powered by blists - more mailing lists