summaryrefslogtreecommitdiff
path: root/nvkm/core/subdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'nvkm/core/subdev.c')
-rw-r--r--nvkm/core/subdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nvkm/core/subdev.c b/nvkm/core/subdev.c
index 69ba1482c..cb1c49c2e 100644
--- a/nvkm/core/subdev.c
+++ b/nvkm/core/subdev.c
@@ -33,7 +33,7 @@ nouveau_subdev(void *obj, int idx)
struct nouveau_object *object = nv_object(obj);
while (object && !nv_iclass(object, NV_SUBDEV_CLASS))
object = object->parent;
- if (object == NULL || nv_subidx(object) != idx)
+ if (object == NULL || nv_subidx(nv_subdev(object)) != idx)
object = nv_device(obj)->subdev[idx];
return object ? nv_subdev(object) : NULL;
}