nouveau: buffer can never be null
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 6 Sep 2014 15:34:28 +0000 (11:34 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 9 Sep 2014 00:06:11 +0000 (20:06 -0400)
Reported by Coverity

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nouveau_video.c

index bd0462542f319df37bb54d527f3e373521cdb17b..d6330fa63a8b2cd644da4c56fd98ed2357d5d15e 100644 (file)
@@ -381,8 +381,6 @@ nouveau_decoder_surface_index(struct nouveau_decoder *dec,
 
    unsigned i;
 
-   if (!buf)
-      return 8;
    for (i = 0; i < dec->num_surfaces; ++i) {
       if (dec->surfaces[i] == buf)
          return i;