[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130424063833.GA1429@avionic-0098.mockup.avionic-design.de>
Date: Wed, 24 Apr 2013 08:38:33 +0200
From: Thierry Reding <thierry.reding@...onic-design.de>
To: Wei Yongjun <weiyj.lk@...il.com>
Cc: grant.likely@...aro.org, rob.herring@...xeda.com,
tbergstrom@...dia.com, amerilainen@...dia.com,
yongjun_wei@...ndmicro.com.cn, linux-kernel@...r.kernel.org,
devicetree-discuss@...ts.ozlabs.org
Subject: Re: [PATCH -next] gpu: host1x: gr2d drivers/gpu/host1x/drm/gr2d.c:
fix error return code in gr2d_submit()
On Wed, Apr 24, 2013 at 10:19:27AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
>
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
> ---
> drivers/gpu/host1x/drm/gr2d.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/host1x/drm/gr2d.c b/drivers/gpu/host1x/drm/gr2d.c
> index 6a45ae0..146cd64 100644
> --- a/drivers/gpu/host1x/drm/gr2d.c
> +++ b/drivers/gpu/host1x/drm/gr2d.c
> @@ -135,8 +135,10 @@ static int gr2d_submit(struct host1x_drm_context *context,
> goto fail;
>
> bo = host1x_bo_lookup(drm, file, cmdbuf.handle);
> - if (!bo)
> + if (!bo) {
> + err = -EINVAL;
I think in this case a better error code would be -ENOENT. Other than
that this patch looks good.
Thierry
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists