nvc0: bail out early during nve4_compute_setup()
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 11 Apr 2013 23:22:32 +0000 (00:22 +0100)
committerChristoph Bumiller <christoph.bumiller@speed.at>
Fri, 12 Apr 2013 15:10:11 +0000 (17:10 +0200)
Exit gracefully rather than trying to create a random object, whenever the
chipset is unknown

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
src/gallium/drivers/nvc0/nve4_compute.c

index 255053072e4840fe465a873b6a277186931d4ce4..7ea61e809d138757243cf46dc445e4c6d2e1d17c 100644 (file)
@@ -51,7 +51,7 @@ nve4_screen_compute_setup(struct nvc0_screen *screen,
       break;
    default:
       NOUVEAU_ERR("unsupported chipset: NV%02x\n", dev->chipset);
-      break;
+      return -1;
    }
 
    ret = nouveau_object_new(chan, 0xbeef00c0, obj_class, NULL, 0,