[patch] tpm: remove a duplicate condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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)++;
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux