]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: omap-des - fix BUG_ON condition
authorAsaf Vertz <asaf.vertz@tandemg.com>
Mon, 5 Jan 2015 08:23:10 +0000 (10:23 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 8 Jan 2015 10:46:17 +0000 (21:46 +1100)
commit2d7cc1266739dddf6a01282095061c13bccb24c6
tree1eeadf3c1b7324dba54e957ee83d61e8baaa177e
parent07942a9b54ca9d0587d9e8cf9a53c06cf9eec0bd
crypto: omap-des - fix BUG_ON condition

dd->total is unsigned so it won't do any good to check for negative
value after subtracting instead of that we should check if the
subtracted value is bigger than him

This was partially found by using a static code analysis program
called cppcheck.

Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/omap-des.c