From owner-svn-src-all@FreeBSD.ORG Fri Mar 20 17:48:36 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D88BE106564A; Fri, 20 Mar 2009 17:48:36 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C68348FC16; Fri, 20 Mar 2009 17:48:36 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2KHmaT7009133; Fri, 20 Mar 2009 17:48:36 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2KHmaos009132; Fri, 20 Mar 2009 17:48:36 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200903201748.n2KHmaos009132@svn.freebsd.org> From: Robert Noland Date: Fri, 20 Mar 2009 17:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190163 - head/sys/dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2009 17:48:37 -0000 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");