mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-07 14:19:35 +00:00
dma-buf: add WARN_ON() illegal dma-fence signaling
Calling the signaling a NULL fence is obviously a coding error in a driver. Those functions unfortunately just returned silently without raising a warning. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20240911085903.1496-2-christian.koenig@amd.com
This commit is contained in:
parent
4cce1373c1
commit
967d226eaa
@ -412,7 +412,7 @@ int dma_fence_signal_timestamp(struct dma_fence *fence, ktime_t timestamp)
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!fence)
|
if (WARN_ON(!fence))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
spin_lock_irqsave(fence->lock, flags);
|
spin_lock_irqsave(fence->lock, flags);
|
||||||
@ -464,7 +464,7 @@ int dma_fence_signal(struct dma_fence *fence)
|
|||||||
int ret;
|
int ret;
|
||||||
bool tmp;
|
bool tmp;
|
||||||
|
|
||||||
if (!fence)
|
if (WARN_ON(!fence))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
tmp = dma_fence_begin_signalling();
|
tmp = dma_fence_begin_signalling();
|
||||||
|
Loading…
Reference in New Issue
Block a user