diff options
author | Eric Anholt <eric@anholt.net> | 2016-01-26 01:13:12 +0300 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2016-02-16 23:20:58 +0300 |
commit | 2c68f1fcfb9cfc10deff9bc59774aa331a6fabd2 (patch) | |
tree | cb3c3d95da6de1d2d60de17363b38ff8b4bc959b /drivers/gpu/drm/vc4/vc4_validate.c | |
parent | 54aec44ab02b1fa216706671ae12d64af74443c5 (diff) | |
download | linux-2c68f1fcfb9cfc10deff9bc59774aa331a6fabd2.tar.xz |
drm/vc4: Return an ERR_PTR from BO creation instead of NULL.
Fixes igt vc4_create_bo/create-bo-0 by returning -EINVAL from the
ioctl instead of -ENOMEM.
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_validate.c')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_validate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c index e26d9f6face3..24c2c746e8f3 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -401,8 +401,8 @@ validate_tile_binning_config(VALIDATE_ARGS) tile_bo = vc4_bo_create(dev, exec->tile_alloc_offset + tile_alloc_size, true); exec->tile_bo = &tile_bo->base; - if (!exec->tile_bo) - return -ENOMEM; + if (IS_ERR(exec->tile_bo)) + return PTR_ERR(exec->tile_bo); list_add_tail(&tile_bo->unref_head, &exec->unref_list); /* tile alloc address. */ |