diff options
author | Wan Jiabing <wanjiabing@vivo.com> | 2022-03-07 12:56:12 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2022-03-08 11:53:52 +0300 |
commit | 8f2a3970c969d0d8d7289a4c65edcedafc16fd92 (patch) | |
tree | e0a7327357859be6789c23ad43c63c6e8e3d78a0 /drivers/gpu/drm/omapdrm | |
parent | 016d1ca3f6ad05676fd9e418715ddce1f4ab5a73 (diff) | |
download | linux-8f2a3970c969d0d8d7289a4c65edcedafc16fd92.tar.xz |
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 <wanjiabing@vivo.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220307095612.409090-1-wanjiabing@vivo.com
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_overlay.c | 2 |
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; } |