Skip to content

Commit

Permalink
drm/nouveau/flcn/msgq: remove error handling for msg_queue_open(), it…
Browse files Browse the repository at this point in the history
… can't fail

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Jan 15, 2020
1 parent 86ce2a7 commit f09a3ee
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/gpu/drm/nouveau/nvkm/falcon/msgq.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@
*/
#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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f09a3ee

Please sign in to comment.