]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - drivers/gpu/drm/radeon/radeon_display.c
drm/radeon: Calling object_unrefer() when creating fb failure
[~shefty/rdma-dev.git] / drivers / gpu / drm / radeon / radeon_display.c
index ff3def7846197bc9f69b929f9fe745d01759f537..05c96fa0b0515a9eab3a89b6bcab97fd1af888dd 100644 (file)
@@ -1115,8 +1115,10 @@ radeon_user_framebuffer_create(struct drm_device *dev,
        }
 
        radeon_fb = kzalloc(sizeof(*radeon_fb), GFP_KERNEL);
-       if (radeon_fb == NULL)
+       if (radeon_fb == NULL) {
+               drm_gem_object_unreference_unlocked(obj);
                return ERR_PTR(-ENOMEM);
+       }
 
        ret = radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj);
        if (ret) {