archive mirror
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <>
To: Peter Huewe <>,
	Marcel Selhorst <>,
	Jarkko Sakkinen <>,
	Jason Gunthorpe <>
	"Gustavo A. R. Silva" <>
Subject: [PATCH] char: tpm: remove unnecessary code
Date: Tue, 30 May 2017 19:05:57 -0500	[thread overview]
Message-ID: <20170531000557.GA3301@embeddedgus> (raw)
In-Reply-To: <>

Remove unnecessary code.
Pointer chip cannot be NULL in st33zp24_send().

Addresses-Coverity-ID: 1397648
Cc: Jason Gunthorpe <>
Signed-off-by: Gustavo A. R. Silva <>
 drivers/char/tpm/st33zp24/st33zp24.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/char/tpm/st33zp24/st33zp24.c b/drivers/char/tpm/st33zp24/st33zp24.c
index 4d1dc8b..ca74c24 100644
--- a/drivers/char/tpm/st33zp24/st33zp24.c
+++ b/drivers/char/tpm/st33zp24/st33zp24.c
@@ -373,8 +373,6 @@ static int st33zp24_send(struct tpm_chip *chip, unsigned char *buf,
 	int ret;
 	u8 data;
-	if (!chip)
-		return -EBUSY;
 	if (len < TPM_HEADER_SIZE)
 		return -EBUSY;

      reply	other threads:[~2017-05-31  0:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-30 22:05 [PATCH] char: tpm: fix potential null pointer dereference Gustavo A. R. Silva
2017-05-30 22:21 ` Jason Gunthorpe
2017-05-30 22:40   ` Gustavo A. R. Silva
2017-05-31  0:05     ` Gustavo A. R. Silva [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170531000557.GA3301@embeddedgus \ \ \ \ \ \ \ \

* 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).