mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomba@kernel.org>
To: Wan Jiabing <wanjiabing@vivo.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: kael_w@qq.com
Subject: Re: [PATCH] drm/omap: fix NULL but dereferenced coccicheck error
Date: Tue, 8 Mar 2022 10:28:39 +0200	[thread overview]
Message-ID: <ef9575ab-d566-908f-9a45-291207316266@kernel.org> (raw)
In-Reply-To: <20220307095612.409090-1-wanjiabing@vivo.com>

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

      reply	other threads:[~2022-03-08  8:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07  9:56 Wan Jiabing
2022-03-08  8:28 ` Tomi Valkeinen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef9575ab-d566-908f-9a45-291207316266@kernel.org \
    --to=tomba@kernel.org \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kael_w@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wanjiabing@vivo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®