summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2022-07-01 02:27:28 +0300
committerDave Airlie <airlied@redhat.com>2022-07-01 02:27:55 +0300
commitb8f0009bc9edf9186b20ae2a9e442ef0af93040e (patch)
treeee69b7603ae091238e62ff7e7666da3e2ecbb517 /drivers/gpu/drm
parent078a3be79325e4a5e7e16576b3919999efadfa3f (diff)
parentee7a69aa38d87a3bbced7b8245c732c05ed0c6ec (diff)
downloadlinux-b8f0009bc9edf9186b20ae2a9e442ef0af93040e.tar.xz
Merge tag 'drm-misc-fixes-2022-06-30' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
A NULL pointer dereference fix for vc4, and 3 patches to improve the sysfb device behaviour when removing conflicting framebuffers Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220630072404.2fa4z3nk5h5q34ci@houat
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/vc4/vc4_perfmon.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_perfmon.c b/drivers/gpu/drm/vc4/vc4_perfmon.c
index c7f5adb6bcf8..79a74184d732 100644
--- a/drivers/gpu/drm/vc4/vc4_perfmon.c
+++ b/drivers/gpu/drm/vc4/vc4_perfmon.c
@@ -17,13 +17,16 @@
void vc4_perfmon_get(struct vc4_perfmon *perfmon)
{
- struct vc4_dev *vc4 = perfmon->dev;
+ struct vc4_dev *vc4;
+ if (!perfmon)
+ return;
+
+ vc4 = perfmon->dev;
if (WARN_ON_ONCE(vc4->is_vc5))
return;
- if (perfmon)
- refcount_inc(&perfmon->refcnt);
+ refcount_inc(&perfmon->refcnt);
}
void vc4_perfmon_put(struct vc4_perfmon *perfmon)