diff options
author | Ben Widawsky <ben@bwidawsk.net> | 2011-06-29 11:41:51 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-06-29 13:05:52 -0700 |
commit | dc501fbc4389f6c15a8da14684b5926e0d9553da (patch) | |
tree | 93ed1c9bcdf72ee5b6214eaa908b3e37c6d88ad9 /drivers/gpu/drm | |
parent | d70bed1947772f34d66ada3bd923bfc12ea2452b (diff) | |
download | linux-3.10-dc501fbc4389f6c15a8da14684b5926e0d9553da.tar.gz linux-3.10-dc501fbc4389f6c15a8da14684b5926e0d9553da.tar.bz2 linux-3.10-dc501fbc4389f6c15a8da14684b5926e0d9553da.zip |
drm/i915: Don't call describe_obj on NULL pointers
Reported-by: Pavel Roskin <proski@gnu.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38777
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 4d46441cbe2..0a893f7400f 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1207,13 +1207,17 @@ static int i915_context_status(struct seq_file *m, void *unused) if (ret) return ret; - seq_printf(m, "power context "); - describe_obj(m, dev_priv->pwrctx); - seq_printf(m, "\n"); + if (dev_priv->pwrctx) { + seq_printf(m, "power context "); + describe_obj(m, dev_priv->pwrctx); + seq_printf(m, "\n"); + } - seq_printf(m, "render context "); - describe_obj(m, dev_priv->renderctx); - seq_printf(m, "\n"); + if (dev_priv->renderctx) { + seq_printf(m, "render context "); + describe_obj(m, dev_priv->renderctx); + seq_printf(m, "\n"); + } mutex_unlock(&dev->mode_config.mutex); |