Skip to content
Snippets Groups Projects
Commit 53d91ca7 authored by Everest K.C's avatar Everest K.C Committed by Herbert Xu
Browse files

crypto: cavium - Fix the if condition to exit loop after timeout


The while loop breaks in the first run because of incorrect
if condition. It also causes the statements after the if to
appear dead.
Fix this by changing the condition from if(timeout--) to
if(!timeout--).

This bug was reported by Coverity Scan.
Report:
CID 1600859: (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: udelay(30UL);

Fixes: 9e2c7d99 ("crypto: cavium - Add Support for Octeon-tx CPT Engine")
Signed-off-by: default avatarEverest K.C. <everestkc@everestkc.com.np>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 7a42b7b9
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment