Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
} map;
};
+static inline bool
+nvif_object_constructed(struct nvif_object *object)
+{
+ return object->client != NULL;
+}
+
int nvif_object_ctor(struct nvif_object *, const char *name, u32 handle,
s32 oclass, void *, u32, struct nvif_object *);
void nvif_object_dtor(struct nvif_object *);
.ioctl.type = NVIF_IOCTL_V0_DEL,
};
- if (!object->client)
+ if (!nvif_object_constructed(object))
return;
nvif_object_unmap(object);