drm/nv50: cleanup properly if PDISPLAY init fails
authorBen Skeggs <bskeggs@redhat.com>
Thu, 25 Mar 2010 06:01:04 +0000 (16:01 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 9 Apr 2010 00:15:17 +0000 (10:15 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nv50_display.c

index bd99986a1146ea573e0c856bf839a6aae8b87f41..fd00f4000f14fc20335954fd7a59cbc7cb0e1f09 100644 (file)
@@ -529,8 +529,10 @@ int nv50_display_create(struct drm_device *dev)
        }
 
        ret = nv50_display_init(dev);
-       if (ret)
+       if (ret) {
+               nv50_display_destroy(dev);
                return ret;
+       }
 
        return 0;
 }