aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_overlay.c
diff options
context:
space:
mode:
authorWan Jiabing <[email protected]>2022-03-07 09:56:12 +0000
committerTomi Valkeinen <[email protected]>2022-03-08 08:53:52 +0000
commit8f2a3970c969d0d8d7289a4c65edcedafc16fd92 (patch)
treee0a7327357859be6789c23ad43c63c6e8e3d78a0 /drivers/gpu/drm/omapdrm/omap_overlay.c
parentdrm/selftests: missing error code in igt_buddy_alloc_smoke() (diff)
downloadkernel-8f2a3970c969d0d8d7289a4c65edcedafc16fd92.tar.gz
kernel-8f2a3970c969d0d8d7289a4c65edcedafc16fd92.zip
drm/omap: fix NULL but dereferenced coccicheck error
Fix the following coccicheck warning: ./drivers/gpu/drm/omapdrm/omap_overlay.c:89:22-25: ERROR: r_ovl is NULL but dereferenced. Here should be ovl->idx rather than r_ovl->idx. Fixes: e02b5cc9e898ad ("drm/omap: Add a 'right overlay' to plane state") Signed-off-by: Wan Jiabing <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_overlay.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_overlay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_overlay.c b/drivers/gpu/drm/omapdrm/omap_overlay.c
index 10730c9b2752..b0bc9ad2ef73 100644
--- a/drivers/gpu/drm/omapdrm/omap_overlay.c
+++ b/drivers/gpu/drm/omapdrm/omap_overlay.c
@@ -86,7 +86,7 @@ int omap_overlay_assign(struct drm_atomic_state *s, struct drm_plane *plane,
r_ovl = omap_plane_find_free_overlay(s->dev, overlay_map,
caps, fourcc);
if (!r_ovl) {
- overlay_map[r_ovl->idx] = NULL;
+ overlay_map[ovl->idx] = NULL;
*overlay = NULL;
return -ENOMEM;
}