提交 8f2a3970 编写于 作者: W Wan Jiabing 提交者: Tomi Valkeinen

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: e02b5cc9 ("drm/omap: Add a 'right overlay' to plane state")
Signed-off-by: NWan Jiabing <wanjiabing@vivo.com>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220307095612.409090-1-wanjiabing@vivo.com
上级 016d1ca3
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册