Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1369219 > unrolled thread

[patch] drm/nouveau/gem: silence uninitialized variable warning

Started byDan Carpenter <dan.carpenter@oracle.com>
First post2016-04-01 13:10 +0200
Last post2016-04-01 13:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [patch] drm/nouveau/gem: silence uninitialized variable warning Dan Carpenter <dan.carpenter@oracle.com> - 2016-04-01 13:10 +0200

#1369219 — [patch] drm/nouveau/gem: silence uninitialized variable warning

FromDan Carpenter <dan.carpenter@oracle.com>
Date2016-04-01 13:10 +0200
Subject[patch] drm/nouveau/gem: silence uninitialized variable warning
Message-ID<rj57J-3qc-31@gated-at.bofh.it>
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@oracle.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);

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web