Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Mar 2009 17:48:36 +0000 (UTC)
From:      Robert Noland <rnoland@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r190163 - head/sys/dev/drm
Message-ID:  <200903201748.n2KHmaos009132@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rnoland
Date: Fri Mar 20 17:48:36 2009
New Revision: 190163
URL: http://svn.freebsd.org/changeset/base/190163

Log:
  Don't deref dev->dev_private before checking that it exists.
  
  Found with:	Coverity Prevent(tm)
  CID:		2940
  
  MFC after:	3 days

Modified:
  head/sys/dev/drm/i915_drv.c

Modified: head/sys/dev/drm/i915_drv.c
==============================================================================
--- head/sys/dev/drm/i915_drv.c	Fri Mar 20 17:11:45 2009	(r190162)
+++ head/sys/dev/drm/i915_drv.c	Fri Mar 20 17:48:36 2009	(r190163)
@@ -46,9 +46,8 @@ static drm_pci_id_list_t i915_pciidlist[
 static int i915_suspend(device_t kdev)
 {
 	struct drm_device *dev = device_get_softc(kdev);
-	struct drm_i915_private *dev_priv = dev->dev_private;
 
-	if (!dev || !dev_priv) {
+	if (!dev || !dev->dev_private) {
 		DRM_ERROR("dev: 0x%lx, dev_priv: 0x%lx\n",
 			(unsigned long) dev, (unsigned long) dev_priv);
 		DRM_ERROR("DRM not initialized, aborting suspend.\n");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903201748.n2KHmaos009132>