diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/core/client.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/core/client.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/client.c b/drivers/gpu/drm/nouveau/nvkm/core/client.c index 297e1e953fa6..e1943910858e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/core/client.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/client.c @@ -28,6 +28,7 @@ #include <nvif/class.h> #include <nvif/event.h> +#include <nvif/if0000.h> #include <nvif/unpack.h> struct nvkm_client_notify { @@ -96,7 +97,7 @@ nvkm_client_notify_new(struct nvkm_object *object, struct nvif_notify_req_v0 v0; } *req = data; u8 index, reply; - int ret; + int ret = -ENOSYS; for (index = 0; index < ARRAY_SIZE(client->notify); index++) { if (!client->notify[index]) @@ -111,7 +112,7 @@ nvkm_client_notify_new(struct nvkm_object *object, return -ENOMEM; nvif_ioctl(object, "notify new size %d\n", size); - if (nvif_unpack(req->v0, 0, 0, true)) { + if (!(ret = nvif_unpack(ret, &data, &size, req->v0, 0, 0, true))) { nvif_ioctl(object, "notify new vers %d reply %d route %02x " "token %llx\n", req->v0.version, req->v0.reply, req->v0.route, req->v0.token); @@ -143,10 +144,10 @@ nvkm_client_mthd_devlist(struct nvkm_object *object, void *data, u32 size) union { struct nv_client_devlist_v0 v0; } *args = data; - int ret; + int ret = -ENOSYS; nvif_ioctl(object, "client devlist size %d\n", size); - if (nvif_unpack(args->v0, 0, 0, true)) { + if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, true))) { nvif_ioctl(object, "client devlist vers %d count %d\n", args->v0.version, args->v0.count); if (size == sizeof(args->v0.device[0]) * args->v0.count) { |