summaryrefslogtreecommitdiff
path: root/drivers/dma-buf/st-dma-resv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma-buf/st-dma-resv.c')
-rw-r--r--drivers/dma-buf/st-dma-resv.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/drivers/dma-buf/st-dma-resv.c b/drivers/dma-buf/st-dma-resv.c
index bc32b3eedcb6..cbe999c6e7a6 100644
--- a/drivers/dma-buf/st-dma-resv.c
+++ b/drivers/dma-buf/st-dma-resv.c
@@ -275,7 +275,7 @@ static int test_shared_for_each_unlocked(void *arg)
static int test_get_fences(void *arg, bool shared)
{
- struct dma_fence *f, *excl = NULL, **fences = NULL;
+ struct dma_fence *f, **fences = NULL;
struct dma_resv resv;
int r, i;
@@ -304,35 +304,19 @@ static int test_get_fences(void *arg, bool shared)
}
dma_resv_unlock(&resv);
- r = dma_resv_get_fences(&resv, &excl, &i, &fences);
+ r = dma_resv_get_fences(&resv, shared, &i, &fences);
if (r) {
pr_err("get_fences failed\n");
goto err_free;
}
- if (shared) {
- if (excl != NULL) {
- pr_err("get_fences returned unexpected excl fence\n");
- goto err_free;
- }
- if (i != 1 || fences[0] != f) {
- pr_err("get_fences returned unexpected shared fence\n");
- goto err_free;
- }
- } else {
- if (excl != f) {
- pr_err("get_fences returned unexpected excl fence\n");
- goto err_free;
- }
- if (i != 0) {
- pr_err("get_fences returned unexpected shared fence\n");
- goto err_free;
- }
+ if (i != 1 || fences[0] != f) {
+ pr_err("get_fences returned unexpected fence\n");
+ goto err_free;
}
dma_fence_signal(f);
err_free:
- dma_fence_put(excl);
while (i--)
dma_fence_put(fences[i]);
kfree(fences);