All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] crypto: omap-sham: Remove useless check for non-null request
@ 2018-03-01 20:50 Krzysztof Kozlowski
  2018-03-01 20:50 ` [PATCH 2/4] crypto: omap-sham - Fix misleading indentation Krzysztof Kozlowski
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2018-03-01 20:50 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Krzysztof Kozlowski,
	Vladimir Zapolskiy, Kamil Konieczny, Tero Kristo, linux-crypto,
	linux-kernel, linux-samsung-soc

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>
---
 drivers/crypto/omap-sham.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 86b89ace836f..7650b1b449bb 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -809,9 +809,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)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-03-09 15:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-01 20:50 [PATCH 1/4] crypto: omap-sham: Remove useless check for non-null request Krzysztof Kozlowski
2018-03-01 20:50 ` [PATCH 2/4] crypto: omap-sham - Fix misleading indentation Krzysztof Kozlowski
2018-03-05  8:59   ` Tero Kristo
2018-03-05  8:59     ` Tero Kristo
2018-03-01 20:50 ` [PATCH 3/4] crypto: s5p-sss: Remove useless check for non-null request Krzysztof Kozlowski
2018-03-01 20:50 ` [PATCH 4/4] crypto: s5p-sss - Constify pointed data (arguments and local variables) Krzysztof Kozlowski
2018-03-05  8:58 ` [PATCH 1/4] crypto: omap-sham: Remove useless check for non-null request Tero Kristo
2018-03-05  8:58   ` Tero Kristo
2018-03-09 15:19 ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.