diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-01-21 08:43:57 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-01-21 08:43:57 +0000 |
commit | 87eabd0fc0b717818fc2d0c32d5f4a1d371c6a89 (patch) | |
tree | fc250bb4430dff7f39bee8e258b1c20887cfcd22 /sys/dev/pci/drm/i915/i915_gem_context.c | |
parent | 81eae6c33e276c5c75e1c40a53d474a3fff08f0b (diff) |
Use PTR_ERR where appropriate instead of a plain cast.
Reduces diffs to Linux.
Diffstat (limited to 'sys/dev/pci/drm/i915/i915_gem_context.c')
-rw-r--r-- | sys/dev/pci/drm/i915/i915_gem_context.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/i915/i915_gem_context.c b/sys/dev/pci/drm/i915/i915_gem_context.c index 5022565672a..4e71a448d7d 100644 --- a/sys/dev/pci/drm/i915/i915_gem_context.c +++ b/sys/dev/pci/drm/i915/i915_gem_context.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_gem_context.c,v 1.5 2013/11/19 19:14:09 kettenis Exp $ */ +/* $OpenBSD: i915_gem_context.c,v 1.6 2014/01/21 08:43:56 kettenis Exp $ */ /* * Copyright © 2011-2012 Intel Corporation * @@ -228,7 +228,7 @@ static int create_default_context(struct drm_i915_private *dev_priv) ctx = create_hw_context(dev, NULL); if (IS_ERR(ctx)) - return (long)(ctx); + return PTR_ERR(ctx); /* We may need to do things with the shrinker which require us to * immediately switch back to the default context. This can cause a @@ -523,7 +523,7 @@ int i915_gem_context_create_ioctl(struct drm_device *dev, void *data, ctx = create_hw_context(dev, file_priv); DRM_UNLOCK(); if (IS_ERR(ctx)) - return (long)(ctx); + return PTR_ERR(ctx); args->ctx_id = ctx->id; DRM_DEBUG_DRIVER("HW context %d created\n", args->ctx_id); |