crypto: omap-sham - Remove useless check for non-null request
authorKrzysztof Kozlowski <krzk@kernel.org>
Thu, 1 Mar 2018 20:50:10 +0000 (21:50 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 9 Mar 2018 14:45:46 +0000 (22:45 +0800)
ahash_request 'req' argument passed by the caller
omap_sham_handle_queue() cannot be NULL here because it is obtained from
non-NULL pointer via container_of().

This fixes smatch warning:
    drivers/crypto/omap-sham.c:812 omap_sham_prepare_request() warn: variable dereferenced before check 'req' (see line 805)

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/omap-sham.c

index 8e7e158..fd380a7 100644 (file)
@@ -817,9 +817,6 @@ static int omap_sham_prepare_request(struct ahash_request *req, bool update)
        bool final = rctx->flags & BIT(FLAGS_FINUP);
        int xmit_len, hash_later;
 
-       if (!req)
-               return 0;
-
        bs = get_block_size(rctx);
 
        if (update)