diff options
author | Eric Anholt <eric@anholt.net> | 2016-01-25 14:13:12 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2016-02-16 12:20:58 -0800 |
commit | 2c68f1fcfb9cfc10deff9bc59774aa331a6fabd2 (patch) | |
tree | cb3c3d95da6de1d2d60de17363b38ff8b4bc959b /drivers/gpu/drm/vc4/vc4_render_cl.c | |
parent | 54aec44ab02b1fa216706671ae12d64af74443c5 (diff) | |
download | op-kernel-dev-2c68f1fcfb9cfc10deff9bc59774aa331a6fabd2.zip op-kernel-dev-2c68f1fcfb9cfc10deff9bc59774aa331a6fabd2.tar.gz |
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_render_cl.c')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_render_cl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c index dea97f4..0f12418 100644 --- a/drivers/gpu/drm/vc4/vc4_render_cl.c +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c @@ -316,8 +316,8 @@ static int vc4_create_rcl_bo(struct drm_device *dev, struct vc4_exec_info *exec, size += xtiles * ytiles * loop_body_size; setup->rcl = &vc4_bo_create(dev, size, true)->base; - if (!setup->rcl) - return -ENOMEM; + if (IS_ERR(setup->rcl)) + return PTR_ERR(setup->rcl); list_add_tail(&to_vc4_bo(&setup->rcl->base)->unref_head, &exec->unref_list); |