]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: inside-secure/eip93 - Correctly handle return of for sg_nents_for_len
authorChristian Marangi <ansuelsmth@gmail.com>
Sat, 15 Feb 2025 23:36:18 +0000 (00:36 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 22 Feb 2025 07:56:03 +0000 (15:56 +0800)
commit217460544a1b9741874dab826eb614e8c006f8a8
tree3824130f30b10daeb6ba8f4304e5f92d652e19db
parentee509efc74ddbc59bb5d6fd6e050f9ef25f74bff
crypto: inside-secure/eip93 - Correctly handle return of for sg_nents_for_len

Fix smatch warning for sg_nents_for_len return value in Inside Secure
EIP93 driver.

The return value of sg_nents_for_len was assigned to an u32 and the
error was ignored and converted to a positive integer.

Rework the code to correctly handle the error from sg_nents_for_len to
mute smatch warning.

Fixes: 9739f5f93b78 ("crypto: eip93 - Add Inside Secure SafeXcel EIP-93 crypto engine support")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/inside-secure/eip93/eip93-common.c