summaryrefslogtreecommitdiff
path: root/drivers/gpu/host1x/fence.c
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2021-10-04 16:44:16 -0600
committerJonathan Corbet <corbet@lwn.net>2021-10-04 16:44:16 -0600
commitb718f9d919d16fb7b97a890f74d34593d9cecd20 (patch)
treeed38d58283ae36e0478bac2e0d244e06dbcc2f1c /drivers/gpu/host1x/fence.c
parent250a0a5ba9d2cfbdb7c77b421ff1e03d630bea46 (diff)
parent9e1ff307c779ce1f0f810c7ecce3d95bbae40896 (diff)
Merge tag 'v5.15-rc4' into docs-next
This is needed to get a docs fix that entered via the DRM tree; testers have requested it so that PDF builds in docs-next work again.
Diffstat (limited to 'drivers/gpu/host1x/fence.c')
-rw-r--r--drivers/gpu/host1x/fence.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/host1x/fence.c b/drivers/gpu/host1x/fence.c
index 6941add95d0f..ecab72882192 100644
--- a/drivers/gpu/host1x/fence.c
+++ b/drivers/gpu/host1x/fence.c
@@ -15,7 +15,7 @@
#include "intr.h"
#include "syncpt.h"
-DEFINE_SPINLOCK(lock);
+static DEFINE_SPINLOCK(lock);
struct host1x_syncpt_fence {
struct dma_fence base;
@@ -152,8 +152,10 @@ struct dma_fence *host1x_fence_create(struct host1x_syncpt *sp, u32 threshold)
return ERR_PTR(-ENOMEM);
fence->waiter = kzalloc(sizeof(*fence->waiter), GFP_KERNEL);
- if (!fence->waiter)
+ if (!fence->waiter) {
+ kfree(fence);
return ERR_PTR(-ENOMEM);
+ }
fence->sp = sp;
fence->threshold = threshold;