All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [patch] tpm: remove a duplicate condition
Date: Wed, 29 Jul 2015 21:27:07 +0000	[thread overview]
Message-ID: <20150729212707.GA21784@mwanda> (raw)

We just checked if "event->event_type = 0 && event->event_size = 0" on
the line before so we don't need to check again.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/char/tpm/tpm_eventlog.c b/drivers/char/tpm/tpm_eventlog.c
index 3a56a13..c20996b 100644
--- a/drivers/char/tpm/tpm_eventlog.c
+++ b/drivers/char/tpm/tpm_eventlog.c
@@ -119,8 +119,7 @@ static void *tpm_bios_measurements_next(struct seq_file *m, void *v,
 	if (event->event_type = 0 && event->event_size = 0)
 		return NULL;
 
-	if ((event->event_type = 0 && event->event_size = 0) ||
-	    ((v + sizeof(struct tcpa_event) + event->event_size) >= limit))
+	if (v + sizeof(struct tcpa_event) + event->event_size >= limit)
 		return NULL;
 
 	(*pos)++;

                 reply	other threads:[~2015-07-29 21:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20150729212707.GA21784@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.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 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.