public inbox for op-tee@lists.trustedfirmware.org
 help / color / mirror / Atom feed
From: Sumit Garg via OP-TEE <op-tee@lists.trustedfirmware.org>
To: Jens Wiklander <jens.wiklander@linaro.org>
Cc: Markus Elfring <Markus.Elfring@web.de>,
	Chen Ni <nichen@iscas.ac.cn>,
	op-tee@lists.trustedfirmware.org,
	LKML <linux-kernel@vger.kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH] optee: Check return value of tee_shm_get_va()
Date: Sun, 15 Mar 2026 10:32:16 +0530	[thread overview]
Message-ID: <abY9WIm2z29SvJeG@sumit-xelite> (raw)
In-Reply-To: <CAHUa44GkZ3jgJg=s+a4RnvMggCxu+mVhU=0z3BKWGkHqDKGaSQ@mail.gmail.com>

On Thu, Mar 12, 2026 at 12:16:11PM +0100, Jens Wiklander wrote:
> On Thu, Mar 12, 2026 at 10:16 AM Sumit Garg <sumit.garg@kernel.org> wrote:
> >
> > On Fri, Mar 06, 2026 at 12:52:39PM +0100, Markus Elfring wrote:
> > > …
> > > > +++ b/drivers/tee/optee/rpc.c
> > > > @@ -393,6 +393,11 @@ static void handle_rpc_func_rpmb_frames(struct tee_context *ctx,
> > > >                         params[0].u.memref.shm_offs);
> > > >     p1 = tee_shm_get_va(params[1].u.memref.shm,
> > > >                         params[1].u.memref.shm_offs);
> > > > +   if (IS_ERR(p0) || IS_ERR(p1)) {
> > > > +           arg->ret = TEEC_ERROR_BAD_PARAMETERS;
> > > > +           goto out;
> > > > +   }
> > > > +
> > > >     if (rpmb_route_frames(rdev, p0, params[0].u.memref.size, p1,
> > > >                           params[1].u.memref.size)) {
> > > >             arg->ret = TEEC_ERROR_BAD_PARAMETERS;
> > > …
> > >
> > > How do you think about to use an additional label for the shown
> > > error code assignment?
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v7.0-rc2#n526
> > >
> >
> > I suppose here you meant to update the label name since it's the same
> > error type used by other code paths too. So following label rename
> > should be fine I think as per coding guidelines:
> >
> > s/out/err_dev_put/
> 
> Wouldn't the name err_dev_put suggest this only occurs in the error path?
> 

Okay, let rather rename it to out_dev_put.

-Sumit

      reply	other threads:[~2026-03-15  5:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-05  8:33 [PATCH] optee: Check return value of tee_shm_get_va() Chen Ni
2026-03-06 11:52 ` Markus Elfring via OP-TEE
2026-03-12  9:16   ` Sumit Garg via OP-TEE
2026-03-12 11:16     ` Jens Wiklander
2026-03-15  5:02       ` Sumit Garg via OP-TEE [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=abY9WIm2z29SvJeG@sumit-xelite \
    --to=op-tee@lists.trustedfirmware.org \
    --cc=Markus.Elfring@web.de \
    --cc=jens.wiklander@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nichen@iscas.ac.cn \
    --cc=sumit.garg@kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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