All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Tomas Winkler <tomas.winkler@intel.com>,
	Peter Huewe <peterhuewe@gmx.de>, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tpm: fix unused-value issues in tpm_try_transmit
Date: Thu, 11 Oct 2018 15:01:40 +0300	[thread overview]
Message-ID: <20181011120140.GA15767@linux.intel.com> (raw)
In-Reply-To: <20181010140638.GA3894@ziepe.ca>

On Wed, Oct 10, 2018 at 08:06:38AM -0600, Jason Gunthorpe wrote:
> On Wed, Oct 10, 2018 at 03:38:17PM +0200, Gustavo A. R. Silva wrote:
> > Currently, there are some values assigned to variable *rc*, which
> > are never actually used in any computation, because such variable
> > is updated at line 550, before they can be used:
> > 
> > 549out:
> > 550        rc = tpm_go_idle(chip, flags);
> > 551        if (rc)
> > 552                goto out;
> > 
> > Fix this by removing such assignments. 
> 
> Should this be done by not quashing rc during the error unwind rather
> than dropping the errors?

Yeah.`

Wondering if tpm_go_idle() should simply be a void-function i.e. issue
just a warning inside (disclaimer: did not revisit its code when writing
this).

> Jason

/Jarkko

  reply	other threads:[~2018-10-11 19:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 13:38 [PATCH] tpm: fix unused-value issues in tpm_try_transmit Gustavo A. R. Silva
2018-10-10 14:06 ` Jason Gunthorpe
2018-10-11 12:01   ` Jarkko Sakkinen [this message]
2018-10-11 13:27     ` Winkler, Tomas
2018-10-15 10:41       ` Jarkko Sakkinen
2018-10-15 11:18         ` Winkler, Tomas

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=20181011120140.GA15767@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavo@embeddedor.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=tomas.winkler@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.