linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: David Binderman <dcb314@hotmail.com>
Cc: "peterhuewe@gmx.de" <peterhuewe@gmx.de>,
	"jarkko.sakkinen@linux.intel.com"
	<jarkko.sakkinen@linux.intel.com>, "jgg@ziepe.ca" <jgg@ziepe.ca>,
	Arnd Bergmann <arnd@arndb.de>,
	"linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: linux-5.4-rc8/drivers/char/tpm/tpm1-cmd.c:735: possible missing return value check
Date: Mon, 18 Nov 2019 10:27:21 +0100	[thread overview]
Message-ID: <20191118092721.GA154812@kroah.com> (raw)
In-Reply-To: <DB7PR08MB3801D9F4D5822D36E57282F39C4D0@DB7PR08MB3801.eurprd08.prod.outlook.com>

On Mon, Nov 18, 2019 at 09:24:32AM +0000, David Binderman wrote:
> Hello there,
> 
> linux-5.4-rc8/drivers/char/tpm/tpm1-cmd.c:735:5: style: Variable 'rc' is reassigned a value before the old one has been used. [redundantAssignment]
> 
> Source code is
> 
>     if (tpm_suspend_pcr)
>         rc = tpm1_pcr_extend(chip, tpm_suspend_pcr, dummy_hash,
>                      "extending dummy pcr before suspend");
> 
>     rc = tpm_buf_init(&buf, TPM_TAG_RQU_COMMAND, TPM_ORD_SAVESTATE);
> 
> Suggest add test of rc after call to tpm1_pcr_extend.

Great, how about you submit a patch to resolve this?  That way you can
get the full credit for finding and resolveing the issue?

thanks,

greg k-h

       reply	other threads:[~2019-11-18  9:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <DB7PR08MB3801D9F4D5822D36E57282F39C4D0@DB7PR08MB3801.eurprd08.prod.outlook.com>
2019-11-18  9:27 ` Greg KH [this message]
     [not found]   ` <DB7PR08MB38017F9C07DA5D40B3133AED9C4D0@DB7PR08MB3801.eurprd08.prod.outlook.com>
2019-11-18 11:22     ` linux-5.4-rc8/drivers/char/tpm/tpm1-cmd.c:735: possible missing return value check Greg KH
2019-11-18 18:07     ` Jarkko Sakkinen

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=20191118092721.GA154812@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=dcb314@hotmail.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    /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;
as well as URLs for NNTP newsgroup(s).