drm/nouveau/flcn/msgq: remove error handling for msg_queue_open(), it can't fail

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Ben Skeggs 2020-01-15 06:34:22 +10:00
parent 86ce2a7153
commit f09a3ee36b

View File

@ -22,13 +22,12 @@
*/ */
#include "qmgr.h" #include "qmgr.h"
static int static void
msg_queue_open(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_queue *queue) msg_queue_open(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_queue *queue)
{ {
struct nvkm_falcon *falcon = priv->falcon; struct nvkm_falcon *falcon = priv->falcon;
mutex_lock(&queue->mutex); mutex_lock(&queue->mutex);
queue->position = nvkm_falcon_rd32(falcon, queue->tail_reg); queue->position = nvkm_falcon_rd32(falcon, queue->tail_reg);
return 0;
} }
static void 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; const struct nvkm_subdev *subdev = priv->falcon->owner;
int ret; int ret;
ret = msg_queue_open(priv, queue); msg_queue_open(priv, queue);
if (ret) {
nvkm_error(subdev, "fail to open queue %d\n", queue->index);
return ret;
}
if (msg_queue_empty(priv, queue)) { if (msg_queue_empty(priv, queue)) {
ret = 0; ret = 0;