aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/lima/lima_devfreq.c
diff options
context:
space:
mode:
authorGaosheng Cui <cuigaosheng1@huawei.com>2022-11-10 17:44:45 +0800
committerMaxime Ripard <maxime@cerno.tech>2022-11-10 12:46:02 +0100
commitdba9e3467425800f9d3a14e8b6a0f85c731c1650 (patch)
tree7bfc90ae5ce3a2cfd490d4a113864dd9a5c95c1e /drivers/gpu/drm/lima/lima_devfreq.c
parentf352262f727215553879705bacbcb208979f3eff (diff)
downloadlinux-dba9e3467425800f9d3a14e8b6a0f85c731c1650.tar.gz
linux-dba9e3467425800f9d3a14e8b6a0f85c731c1650.tar.bz2
linux-dba9e3467425800f9d3a14e8b6a0f85c731c1650.zip
drm/vc4: kms: Fix IS_ERR() vs NULL check for vc4_kms
The drm_atomic_get_new_private_obj_state() function returns NULL on error path, drm_atomic_get_old_private_obj_state() function returns NULL on error path, too, they does not return error pointers. By the way, vc4_hvs_get_new/old_global_state() should return ERR_PTR(-EINVAL), otherwise there will be null-ptr-defer issue, such as follows: In function vc4_atomic_commit_tail(): |-- old_hvs_state = vc4_hvs_get_old_global_state(state); <-- return NULL |-- if (WARN_ON(IS_ERR(old_hvs_state))) <-- no return |-- unsigned long state_rate = max(old_hvs_state->core_clock_rate, new_hvs_state->core_clock_rate); <-- null-ptr-defer Fixes: 9ec03d7f1ed3 ("drm/vc4: kms: Wait on previous FIFO users before a commit") Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20221110094445.2930509-6-cuigaosheng1@huawei.com
Diffstat (limited to 'drivers/gpu/drm/lima/lima_devfreq.c')
0 files changed, 0 insertions, 0 deletions