intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* Re: drm/i915: add i915_gem_context_get_hang_stats()
@ 2013-06-19 15:02 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-06-19 15:02 UTC (permalink / raw)
  To: mika.kuoppala; +Cc: intel-gfx

Hello Mika Kuoppala,

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

The patch c0bb617a70c9: "drm/i915: add
i915_gem_context_get_hang_stats()" from Jun 12, 2013, leads to the
following Smatch complaint:

drivers/gpu/drm/i915/i915_gem_context.c:321 i915_gem_context_get_hang_stats()
	 warn: variable dereferenced before check 'file' (see line 312)

drivers/gpu/drm/i915/i915_gem_context.c
   311		struct drm_i915_private *dev_priv = ring->dev->dev_private;
   312		struct drm_i915_file_private *file_priv = file->driver_priv;
                                                          ^^^^^^^^^^^^^^^^^
New dereference.

   313		struct i915_hw_context *to;
   314	
   315		if (dev_priv->hw_contexts_disabled)
   316			return ERR_PTR(-ENOENT);
   317	
   318		if (ring->id != RCS)
   319			return ERR_PTR(-EINVAL);
   320	
   321		if (file == NULL)
                    ^^^^^^^^^^^^
New check.

   322			return ERR_PTR(-EINVAL);
   323	

regards,
dan carpenter

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

only message in thread, other threads:[~2013-06-19 15:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-19 15:02 drm/i915: add i915_gem_context_get_hang_stats() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).