From 5c15bf709eb6fb52c5bcb95d545250dde22f9625 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Thu, 20 Aug 2015 14:54:16 +1000 Subject: drm/nouveau/nvif: return success from sclass even for objects without children Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/drm/nouveau/nvkm/core') diff --git a/drivers/gpu/drm/nouveau/nvkm/core/ioctl.c b/drivers/gpu/drm/nouveau/nvkm/core/ioctl.c index 629ee56dd8ab..ee6ff01c2b1b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/core/ioctl.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/ioctl.c @@ -57,18 +57,18 @@ nvkm_ioctl_sclass(struct nvkm_handle *handle, void *data, u32 size) } *args = data; int ret; - if (!nv_iclass(object, NV_PARENT_CLASS)) { - nvif_debug(object, "cannot have children (sclass)\n"); - return -ENODEV; - } - nvif_ioctl(object, "sclass size %d\n", size); if (nvif_unpack(args->v0, 0, 0, true)) { nvif_ioctl(object, "sclass vers %d count %d\n", args->v0.version, args->v0.count); if (size == args->v0.count * sizeof(args->v0.oclass[0])) { - ret = nvkm_parent_lclass(object, args->v0.oclass, + if (nv_iclass(object, NV_PARENT_CLASS)) { + ret = nvkm_parent_lclass(object, + args->v0.oclass, args->v0.count); + } else { + ret = 0; + } if (ret >= 0) { args->v0.count = ret; ret = 0; -- cgit v1.2.3