* [patch] drm/nouveau/gem: silence uninitialized variable warning
@ 2016-04-01 11:03 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-04-01 11:03 UTC (permalink / raw)
To: David Airlie
Cc: Ben Skeggs, Ilia Mirkin, Pekka Enberg, Andrew Morton,
Sudip Mukherjee, Alexandre Courbot, dri-devel, linux-kernel,
kernel-janitors
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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [patch] drm/nouveau/gem: silence uninitialized variable warning
@ 2016-04-01 11:03 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-04-01 11:03 UTC (permalink / raw)
To: David Airlie
Cc: kernel-janitors, linux-kernel, dri-devel, Pekka Enberg,
Ben Skeggs, Andrew Morton, Sudip Mukherjee
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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [patch] drm/nouveau/gem: silence uninitialized variable warning
@ 2016-04-01 11:03 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-04-01 11:03 UTC (permalink / raw)
To: David Airlie
Cc: kernel-janitors, linux-kernel, dri-devel, Pekka Enberg,
Ben Skeggs, Andrew Morton, Sudip Mukherjee
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);
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-01 11:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01 11:03 [patch] drm/nouveau/gem: silence uninitialized variable warning Dan Carpenter
2016-04-01 11:03 ` Dan Carpenter
2016-04-01 11:03 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.