aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2022-04-25 11:03:29 -0700
committerVinod Koul <vkoul@kernel.org>2022-05-19 23:43:41 +0530
commitd1a28597808268b87f156138aad3104aa255e62b (patch)
treed7153e5bf5ad9317735b1f156e19f08155e134cb /drivers/dma
parentdmaengine: sun6i: Add support for the D1 variant (diff)
downloadlinux-dev-d1a28597808268b87f156138aad3104aa255e62b.tar.xz
linux-dev-d1a28597808268b87f156138aad3104aa255e62b.zip
dmaengine: idxd: make idxd_wq_enable() return 0 if wq is already enabled
When calling idxd_wq_enable() and wq is already enabled, code should return 0 and indicate function is successful instead of return error code and fail. This should also put idxd_wq_enable() in sync with idxd_wq_disable() where it returns 0 if wq is already disabled. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/165090980906.1378449.1939401700832432886.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/idxd/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
index 1143886f4a80..dd6a05eccb18 100644
--- a/drivers/dma/idxd/device.c
+++ b/drivers/dma/idxd/device.c
@@ -184,7 +184,7 @@ int idxd_wq_enable(struct idxd_wq *wq)
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, &status);