From: Thierry Reding <thierry.reding@avionic-design.de>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: grant.likely@linaro.org, rob.herring@calxeda.com,
tbergstrom@nvidia.com, amerilainen@nvidia.com,
yongjun_wei@trendmicro.com.cn, linux-kernel@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH -next] gpu: host1x: gr2d drivers/gpu/host1x/drm/gr2d.c: fix error return code in gr2d_submit()
Date: Wed, 24 Apr 2013 08:38:33 +0200 [thread overview]
Message-ID: <20130424063833.GA1429@avionic-0098.mockup.avionic-design.de> (raw)
In-Reply-To: <CAPgLHd8Nj-K4X8gX4_bMFcYjCBU=XzFnGidhvfF0ZtoCXCv0qg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 933 bytes --]
On Wed, Apr 24, 2013 at 10:19:27AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.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@trendmicro.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
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2013-04-24 6:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 2:19 Wei Yongjun
2013-04-24 6:38 ` Thierry Reding [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130424063833.GA1429@avionic-0098.mockup.avionic-design.de \
--to=thierry.reding@avionic-design.de \
--cc=amerilainen@nvidia.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=tbergstrom@nvidia.com \
--cc=weiyj.lk@gmail.com \
--cc=yongjun_wei@trendmicro.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®