drm/panfrost: Only put sync_out if non-NULL
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Thu, 9 May 2019 08:21:51 +0000 (10:21 +0200)
committerRob Herring <robh@kernel.org>
Mon, 13 May 2019 14:46:53 +0000 (09:46 -0500)
commitcc2e787ee7c2c00698bb84a3da4adb3a84187e67
tree7e09f2f74af8e3d6dff855f09e8fd2dd6501c16e
parenteb85d03e01c3e9f3b0ba7282b2e3515a635decb2
drm/panfrost: Only put sync_out if non-NULL

Dan Carpenter's static analysis tool reported:

drivers/gpu/drm/panfrost/panfrost_drv.c:222 panfrost_ioctl_submit()
error: we previously assumed 'sync_out' could be null (see line 216)

Indeed, sync_out could be NULL if userspace doesn't send a sync object
ID for the out fence.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lists.freedesktop.org/archives/dri-devel/2019-May/217014.html
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190509082151.8823-1-tomeu.vizoso@collabora.com
drivers/gpu/drm/panfrost/panfrost_drv.c