[bug report] drm/tegra: dc: Simplify atomic plane helper functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux