svn commit: r194722 - in stable/7/sys: . contrib/pf dev/drm

Robert Noland rnoland at FreeBSD.org
Tue Jun 23 15:50:49 UTC 2009


Author: rnoland
Date: Tue Jun 23 15:50:48 2009
New Revision: 194722
URL: http://svn.freebsd.org/changeset/base/194722

Log:
  Merge 190163 from HEAD
  
  Don't deref dev->dev_private before checking that it exists.
  
  Found with:     Coverity Prevent(tm)
  CID:            2940

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/drm/i915_drv.c

Modified: stable/7/sys/dev/drm/i915_drv.c
==============================================================================
--- stable/7/sys/dev/drm/i915_drv.c	Tue Jun 23 15:49:02 2009	(r194721)
+++ stable/7/sys/dev/drm/i915_drv.c	Tue Jun 23 15:50:48 2009	(r194722)
@@ -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");


More information about the svn-src-stable-7 mailing list