mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
24 lines
829 B
Diff
24 lines
829 B
Diff
|
From 02e41ddac8a960df7defaa377c1d3d981ac0a652 Mon Sep 17 00:00:00 2001
|
||
|
From: Dom Cobley <popcornmix@gmail.com>
|
||
|
Date: Wed, 27 Apr 2022 14:45:35 +0100
|
||
|
Subject: [PATCH] drm/vc4_kms: Protect hvs dereference on fkms
|
||
|
|
||
|
fkms has a null hvs pointer so this crashes. Protect against it
|
||
|
|
||
|
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
||
|
---
|
||
|
drivers/gpu/drm/vc4/vc4_kms.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
--- a/drivers/gpu/drm/vc4/vc4_kms.c
|
||
|
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
|
||
|
@@ -354,7 +354,7 @@ static void vc4_atomic_commit_tail(struc
|
||
|
struct vc4_hvs_state *new_hvs_state;
|
||
|
struct drm_crtc *crtc;
|
||
|
struct vc4_hvs_state *old_hvs_state;
|
||
|
- unsigned long max_clock_rate = clk_get_max_rate(hvs->core_clk);
|
||
|
+ unsigned long max_clock_rate = hvs ? clk_get_max_rate(hvs->core_clk) : 0;
|
||
|
unsigned int channel;
|
||
|
int i;
|
||
|
|