]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dma-buf/sw_sync: Decrement refcount on error in sw_sync_ioctl_get_deadline()
authorDan Carpenter <dan.carpenter@linaro.org>
Tue, 8 Apr 2025 11:01:26 +0000 (14:01 +0300)
committerChristian König <christian.koenig@amd.com>
Fri, 11 Apr 2025 12:22:22 +0000 (14:22 +0200)
commitd27326a9999286fa45ad063f760e63329254f130
tree1f0b0ad112e00ac2798c0d300f09531b6e20b113
parent31660b406d872b5ccb3c2ec6f932969809c35b18
dma-buf/sw_sync: Decrement refcount on error in sw_sync_ioctl_get_deadline()

Call dma_fence_put(fence) before returning an error if
dma_fence_to_sync_pt() fails.  Use an unwind ladder at the
end of the function to do the cleanup.

Fixes: 70e67aaec2f4 ("dma-buf/sw_sync: Add fence deadline support")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/a010a1ac-107b-4fc0-a052-9fd3706ad690@stanley.mountain
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/dma-buf/sw_sync.c