dma: change an atmoic api for Coverity issue 233524
use atomic_clear_bit instead of atomic_test_and_set_bit
which will not return old value, and thus more coverity friendy
Fixing: #35154
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
diff --git a/include/drivers/dma.h b/include/drivers/dma.h
index 07fa8ec..2902e8d 100644
--- a/include/drivers/dma.h
+++ b/include/drivers/dma.h
@@ -402,7 +402,7 @@
channel = i;
if (api->chan_filter &&
!api->chan_filter(dev, channel, filter_param)) {
- atomic_test_and_clear_bit(dma_ctx->atomic, channel);
+ atomic_clear_bit(dma_ctx->atomic, channel);
continue;
}
break;
@@ -434,7 +434,7 @@
}
if (channel < dma_ctx->dma_channels) {
- atomic_test_and_clear_bit(dma_ctx->atomic, channel);
+ atomic_clear_bit(dma_ctx->atomic, channel);
}
}