[Beignet] [PATCH 1/2] we should check the 'err' parameter
Zhigang Gong
zhigang.gong at linux.intel.com
Wed Sep 25 19:14:42 PDT 2013
This patchset LGTM, will push it latter. Thanks.
On Mon, Sep 23, 2013 at 03:06:23PM +0800, Lu Guanqun wrote:
> Signed-off-by: Lu Guanqun <guanqun.lu at intel.com>
> ---
> src/cl_mem_gl.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/cl_mem_gl.c b/src/cl_mem_gl.c
> index 2d26226..28d2ac6 100644
> --- a/src/cl_mem_gl.c
> +++ b/src/cl_mem_gl.c
> @@ -63,11 +63,9 @@ cl_mem_new_gl_texture(cl_context ctx,
> goto error;
> }
>
> - mem = cl_mem_allocate(CL_MEM_GL_IMAGE_TYPE, ctx, flags, 0, 0, errcode_ret);
> - if (mem == NULL) {
> - err = CL_OUT_OF_HOST_MEMORY;
> + mem = cl_mem_allocate(CL_MEM_GL_IMAGE_TYPE, ctx, flags, 0, 0, &err);
> + if (mem == NULL || err != CL_SUCCESS)
> goto error;
> - }
>
> mem->bo = cl_buffer_alloc_from_texture(ctx, texture_target, miplevel,
> texture, cl_mem_image(mem));
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list