mirror of
https://github.com/torvalds/linux.git
synced 2024-12-24 20:01:55 +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;
|
||||
int ret;
|
||||
|
||||
if (!fence)
|
||||
if (WARN_ON(!fence))
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(fence->lock, flags);
|
||||
@ -464,7 +464,7 @@ int dma_fence_signal(struct dma_fence *fence)
|
||||
int ret;
|
||||
bool tmp;
|
||||
|
||||
if (!fence)
|
||||
if (WARN_ON(!fence))
|
||||
return -EINVAL;
|
||||
|
||||
tmp = dma_fence_begin_signalling();
|
||||
|
Loading…
Reference in New Issue
Block a user