From 9c20a7cf4c5fdb1eb89ce5c78f7521addf4d82b8 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 13 Dec 2010 17:55:51 +0100 Subject: [PATCH] since COP_FLAG_* are bits, we can OR them together for checks Signed-off-by: Nikos Mavrogiannopoulos --- cryptodev_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cryptodev_main.c b/cryptodev_main.c index 2a6e4bc..38e1a44 100644 --- a/cryptodev_main.c +++ b/cryptodev_main.c @@ -705,8 +705,7 @@ static int crypto_run(struct fcrypt *fcr, struct kernel_crypt_op *kcop) return -EINVAL; } - if (ses_ptr->hdata.init != 0 && !(cop->flags & COP_FLAG_UPDATE) && - !(cop->flags & COP_FLAG_FINAL)) { + if (ses_ptr->hdata.init != 0 && !(cop->flags & (COP_FLAG_UPDATE | COP_FLAG_FINAL))) { ret = cryptodev_hash_reset(&ses_ptr->hdata); if (unlikely(ret)) { dprintk(1, KERN_ERR, -- 2.11.4.GIT