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: Markus Elfring <Markus.Elfring@web.de>
Cc: 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: Thu, 12 Mar 2026 14:46:38 +0530	[thread overview]
Message-ID: <abKEdk6MpkVHBlfi@sumit-xelite> (raw)
In-Reply-To: <2e15b2b8-7dd4-4e63-b9a9-a664323ebb36@web.de>

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/

-Sumit

  reply	other threads:[~2026-03-12  9:17 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 [this message]
2026-03-12 11:16     ` Jens Wiklander
2026-03-15  5:02       ` Sumit Garg via OP-TEE

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=abKEdk6MpkVHBlfi@sumit-xelite \
    --to=op-tee@lists.trustedfirmware.org \
    --cc=Markus.Elfring@web.de \
    --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