drm/nouveau/flcn/msgq: remove error handling for msg_queue_open(), it can't fail
authorBen Skeggs <bskeggs@redhat.com>
Tue, 14 Jan 2020 20:34:22 +0000 (06:34 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 15 Jan 2020 00:50:29 +0000 (10:50 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/falcon/msgq.c

index eb499b796fe5698db4db39ba4a27853c26986f92..ea3e7c73e990eea8c31ee829a1929cb117aa7e16 100644 (file)
  */
 #include "qmgr.h"
 
-static int
+static void
 msg_queue_open(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_queue *queue)
 {
        struct nvkm_falcon *falcon = priv->falcon;
        mutex_lock(&queue->mutex);
        queue->position = nvkm_falcon_rd32(falcon, queue->tail_reg);
-       return 0;
 }
 
 static void
@@ -91,11 +90,7 @@ msg_queue_read(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_queue *queue,
        const struct nvkm_subdev *subdev = priv->falcon->owner;
        int ret;
 
-       ret = msg_queue_open(priv, queue);
-       if (ret) {
-               nvkm_error(subdev, "fail to open queue %d\n", queue->index);
-               return ret;
-       }
+       msg_queue_open(priv, queue);
 
        if (msg_queue_empty(priv, queue)) {
                ret = 0;