* [patch] tpm: remove a duplicate condition
@ 2015-07-29 21:27 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-07-29 21:27 UTC (permalink / raw)
To: kernel-janitors
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)++;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-29 21:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-29 21:27 [patch] tpm: remove a duplicate condition Dan Carpenter
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).