Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [bug report] drm/tegra: dc: Simplify atomic plane helper functions
Date: Mon, 13 Nov 2017 14:43:18 +0300	[thread overview]
Message-ID: <20171113113023.tc2b4nowb4ygbxp5@mwanda> (raw)

Hello Thierry Reding,

This is a semi-automatic email about new static checker warnings.

The patch a4bfa0961c4b: "drm/tegra: dc: Simplify atomic plane helper 
functions" from Aug 30, 2017, leads to the following Smatch complaint:

    drivers/gpu/drm/tegra/dc.c:562 tegra_plane_atomic_disable()
     warn: variable dereferenced before check 'old_state' (see line 556)

drivers/gpu/drm/tegra/dc.c
   555	{
   556		struct tegra_dc *dc = to_tegra_dc(old_state->crtc);
                                                  ^^^^^^^^^^^^^^^
Patch adds dereference

   557		struct tegra_plane *p = to_tegra_plane(plane);
   558		unsigned long flags;
   559		u32 value;
   560	
   561		/* rien ne va plus */
                   ^^^^^^^^^^^^^^^
Patch adds some culture which the kernel was sorely in need of.

   562		if (!old_state || !old_state->crtc)
                     ^^^^^^^^^
Patch adds check

   563			return;
   564	

regards,
dan carpenter

                 reply	other threads:[~2017-11-13 11:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20171113113023.tc2b4nowb4ygbxp5@mwanda \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /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