Skip to content

Commit a524851

Browse files
Colin Ian Kingherbertx
authored andcommitted
crypto: mediatek - remove redundant bitwise-or
Bitwise-or'ing 0xffffffff with the u32 variable ctr is the same result as assigning the value to ctr. Remove the redundant bitwise-or and just use an assignment. Addresses-Coverity: ("Suspicious &= or |= constant expression") Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent f398243 commit a524851

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/crypto/mediatek/mtk-aes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ static int mtk_aes_ctr_transfer(struct mtk_cryp *cryp, struct mtk_aes_rec *aes)
591591
start = ctr;
592592
end = start + blocks - 1;
593593
if (end < start) {
594-
ctr |= 0xffffffff;
594+
ctr = 0xffffffff;
595595
datalen = AES_BLOCK_SIZE * -start;
596596
fragmented = true;
597597
}

0 commit comments

Comments
 (0)