diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-07-19 08:45:46 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-07-19 08:58:33 +0200 |
commit | db473b36d4a2eb02c65aefca11578698b3699fe0 (patch) | |
tree | 6644aa6d0b6a4a3fcb01a1cb2591010ad1afe254 /drivers/gpu/drm/i915/i915_gem_stolen.c | |
parent | bf8fa3d383aa9eb0003419e40ad0f3667c810154 (diff) | |
download | linux-db473b36d4a2eb02c65aefca11578698b3699fe0.tar.bz2 |
drm/i915: checking for NULL instead of IS_ERR()
i915_gem_vma_create() returns and ERR_PTR() or a valid pointer, it never
returns NULL.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_stolen.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_stolen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c index fc894f7d32e1..9a1896c86dcd 100644 --- a/drivers/gpu/drm/i915/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c @@ -392,8 +392,8 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev, return obj; vma = i915_gem_vma_create(obj, &dev_priv->gtt.base); - if (!vma) { - ret = -ENOMEM; + if (IS_ERR(vma)) { + ret = PTR_ERR(vma); goto err_out; } |