aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvif/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvif/object.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvif/object.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvif/object.c b/drivers/gpu/drm/nouveau/nvif/object.c
index b0c82206ece2..dd85b56f6aa5 100644
--- a/drivers/gpu/drm/nouveau/nvif/object.c
+++ b/drivers/gpu/drm/nouveau/nvif/object.c
@@ -275,8 +275,10 @@ nvif_object_new(struct nvif_object *parent, u32 handle, u32 oclass,
275 if (object) { 275 if (object) {
276 int ret = nvif_object_init(parent, nvif_object_del, handle, 276 int ret = nvif_object_init(parent, nvif_object_del, handle,
277 oclass, data, size, object); 277 oclass, data, size, object);
278 if (ret) 278 if (ret) {
279 kfree(object); 279 kfree(object);
280 object = NULL;
281 }
280 *pobject = object; 282 *pobject = object;
281 return ret; 283 return ret;
282 } 284 }