Linux Tegra architecture development
 help / color / mirror / Atom feed
* [bug report] drm/tegra: dc: Simplify atomic plane helper functions
@ 2017-11-13 11:43 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2017-11-13 11:43 UTC (permalink / raw)
  To: treding-DDmLM1+adcrQT0dZR+AlfA; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-13 11:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-13 11:43 [bug report] drm/tegra: dc: Simplify atomic plane helper functions Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox