UPSTREAM: dma-buf: fix an error pointer vs NULL bug
Smatch detected potential error pointer dereference.
drivers/gpu/drm/drm_syncobj.c:888 drm_syncobj_transfer_to_timeline()
error: 'fence' dereferencing possible ERR_PTR()
The error pointer comes from dma_fence_allocate_private_stub(). One
caller expected error pointers and one expected NULL pointers. Change
it to return NULL and update the caller which expected error pointers,
drm_syncobj_assign_null_handle(), to check for NULL instead.
Bug: 286438670
Bug: 296793123
Fixes: f781f661 ("dma-buf: keep the signaling time of merged fences v3")
Signed-off-by:
Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by:
Christian König <christian.koenig@amd.com>
Reviewed-by:
Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by:
Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/b09f1996-3838-4fa2-9193-832b68262e43@moroto.mountain
(cherry picked from commit 00ae1491)
Change-Id: I9fe1e61543e84a0f22d8ec26e01d94b809620744
Signed-off-by:
Jindong Yue <jindong.yue@nxp.com>
Loading
Please sign in to comment