mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 14:14:37 +00:00
drm/omap: fix NULL but dereferenced coccicheck error
[ Upstream commit8f2a3970c9
] 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:e02b5cc9e8
("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 Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
4e1e37d198
commit
d2507be660
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
r_ovl = omap_plane_find_free_overlay(s->dev, overlay_map,
|
||||||
caps, fourcc);
|
caps, fourcc);
|
||||||
if (!r_ovl) {
|
if (!r_ovl) {
|
||||||
overlay_map[r_ovl->idx] = NULL;
|
overlay_map[ovl->idx] = NULL;
|
||||||
*overlay = NULL;
|
*overlay = NULL;
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue