summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/i915_drv.c
diff options
context:
space:
mode:
authorrnoland <rnoland@FreeBSD.org>2009-03-20 17:48:36 +0000
committerrnoland <rnoland@FreeBSD.org>2009-03-20 17:48:36 +0000
commit1d4e9916169bc5b4e7c36b31a9e095c6ccc7c39e (patch)
treebf05d74ddcc7094092ac90fadc66f96481940808 /sys/dev/drm/i915_drv.c
parent5d4c919934613f1067d0aa8447a095a31d6e608a (diff)
downloadFreeBSD-src-1d4e9916169bc5b4e7c36b31a9e095c6ccc7c39e.zip
FreeBSD-src-1d4e9916169bc5b4e7c36b31a9e095c6ccc7c39e.tar.gz
Don't deref dev->dev_private before checking that it exists.
Found with: Coverity Prevent(tm) CID: 2940 MFC after: 3 days
Diffstat (limited to 'sys/dev/drm/i915_drv.c')
-rw-r--r--sys/dev/drm/i915_drv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/drm/i915_drv.c b/sys/dev/drm/i915_drv.c
index 9715814..7fa513c 100644
--- a/sys/dev/drm/i915_drv.c
+++ b/sys/dev/drm/i915_drv.c
@@ -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");
OpenPOWER on IntegriCloud