lkml.org 
[lkml]   [2022]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] drm/omap: fix NULL but dereferenced coccicheck error
From
Hi,

On 07/03/2022 11:56, Wan Jiabing wrote:
> 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.
>
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
> ---
> drivers/gpu/drm/omapdrm/omap_overlay.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
> }

Thanks, I'll pick this up.

Tomi

\
 
 \ /
  Last update: 2022-03-08 09:30    [W:0.043 / U:1.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site