From 27de8b7ebcd837e6040f025643bb483957aa762d Mon Sep 17 00:00:00 2001 From: Dave Jiang Date: Thu, 21 Apr 2022 10:16:24 -0700 Subject: [PATCH] dmaengine: idxd: return 0 if wq already enabled instead of error commit 3a5e5ffd0d28c0c9b71f047668baca77723b6875 Intel-BKC. If wq is already enabled and idxd_wq_enable() is called, return 0 instead of error since it's not a real error. Signed-off-by: Dave Jiang Signed-off-by: Chen Zhuo Signed-off-by: Xinghui Li --- drivers/dma/idxd/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index c9c2aaf46d38..ddde520c5e0c 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -248,7 +248,7 @@ int idxd_wq_enable(struct idxd_wq *wq, u32 *status) if (wq->state == IDXD_WQ_ENABLED) { dev_dbg(dev, "WQ %d already enabled\n", wq->id); - return -ENXIO; + return 0; } idxd_cmd_exec(idxd, IDXD_CMD_ENABLE_WQ, wq->id, &stat);