From: Krzysztof Kozlowski Date: Thu, 1 Mar 2018 20:50:12 +0000 (+0100) Subject: crypto: s5p-sss - Remove useless check for non-null request X-Git-Tag: v4.17-rc1~128^2~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e477c59ba7e1f5d3c3cfea4d4c282c722b47357;p=thirdparty%2Flinux.git crypto: s5p-sss - Remove useless check for non-null request ahash_request 'req' argument passed by the caller s5p_hash_handle_queue() cannot be NULL here because it is obtained from non-NULL pointer via container_of(). This fixes smatch warning: drivers/crypto/s5p-sss.c:1213 s5p_hash_prepare_request() warn: variable dereferenced before check 'req' (see line 1208) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 5d64c08b7f47e..d7c8163e50686 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -1210,9 +1210,6 @@ static int s5p_hash_prepare_request(struct ahash_request *req, bool update) int xmit_len, hash_later, nbytes; int ret; - if (!req) - return 0; - if (update) nbytes = req->nbytes; else