drm/panfrost: Fix a BO leak in panfrost_ioctl_mmap_bo()
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 29 Nov 2019 13:59:03 +0000 (14:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 10:04:50 +0000 (11:04 +0100)
commitab84a17e78cf3c5380465f2a530c29ec96945178
tree893884d2ef3d3ed4d2cbcb57f13e8c707127bd4e
parent1ecf1946856224ebde8078a94bebba95222456b3
drm/panfrost: Fix a BO leak in panfrost_ioctl_mmap_bo()

commit 3bb69dbcb9e8430e0cc9990cff427ca3ae25ffdc upstream.

We should release the reference we grabbed when an error occurs.

Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191129135908.2439529-4-boris.brezillon@collabora.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/panfrost/panfrost_drv.c