[Mesa-dev] [PATCH 3/6] nvc0: bail out early during nve4_compute_setup()

Emil Velikov emil.l.velikov at gmail.com
Thu Apr 11 16:22:32 PDT 2013


Exit gracefully rather than trying to create a random object, whenever the
chipset is unknown

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/drivers/nvc0/nve4_compute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nvc0/nve4_compute.c b/src/gallium/drivers/nvc0/nve4_compute.c
index 2550530..dce0930 100644
--- a/src/gallium/drivers/nvc0/nve4_compute.c
+++ b/src/gallium/drivers/nvc0/nve4_compute.c
@@ -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 0;
    }
 
    ret = nouveau_object_new(chan, 0xbeef00c0, obj_class, NULL, 0,
-- 
1.8.2.1



More information about the mesa-dev mailing list